Playwright · Junior · Question 11 of 75
What does setting baseURL in the config allow?
- 1Blocking requests to any other domain
- 2Using relative URLs like
page.goto('/login') - 3Running tests against several sites at once
Show the answer
Correct answer: Using relative URLs like page.goto('/login')
Explanation
With use: { baseURL: 'http://localhost:3000' }, navigation and toHaveURL can use relative paths. Changing environments then means changing one setting.