arrow-left Back to topicQuizConfiguration (use)Check yourself1.You have baseURL: 'http://localhost:3000' in the global use config. One test file needs to test against 'http://localhost:4000' (a different microservice). How do you override it just for that file without affecting other tests?Change the global baseURL in playwright.config.ts and use environment variables to switchAdd test.use({ baseURL: 'http://localhost:4000' }) at the top of the test file — it overrides only for tests in that filePass the URL directly to every page.goto() call in that file instead of using baseURL2.What does storageState in the use block do?It defines where Playwright saves screenshots and trace filesIt loads a previously saved authentication state (cookies, localStorage) into every new browser context so tests start already logged inIt sets the directory where Playwright stores browser data between test runsIt enables localStorage persistence across tests in the same file3.You need all tests to simulate a device in dark mode with a Ukrainian locale. Where do you put these settings?In a beforeEach hook in every test fileIn the use: {} block of playwright.config.ts — colorScheme: 'dark' and locale: 'uk-UA'In package.json under a playwright keyIn an environment variable PLAYWRIGHT_LOCALE and PLAYWRIGHT_COLOR_SCHEME4.What does viewport: { width: 1280, height: 720 } in the use block do?It sets the resolution of screenshots captured during the testIt sets the browser window size for every test, affecting layout and responsive design behaviourIt sets the minimum screen resolution required to run the testsIt only affects video recordings — not the actual browser window5.What is the cascade order when test.use() is called both at the file level and inside a test.describe() block?The file-level use always wins over describe-level useThe describe-level use overrides the file-level use for tests inside that describe blockBoth are applied and merged — the last one wins for conflicting keysOnly one test.use() can be active at a time — the second call throws an error6.You want to test that your app correctly requests the user's location. Which use options do you set?Set geoLocation to the coordinates and allowGeo: trueSet geolocation to the coordinates and include 'geolocation' in the permissions arrayUse page.setGeolocation() inside each test — there is no use option for thisSet locationServices: { latitude: 50, longitude: 30 } in the use block7.What does timezoneId in the use block affect in tests?The timezone of the CI server running the testsThe timezone seen by the browser's JavaScript — new Date() and Intl APIs return times in that timezoneThe timezone used by Playwright for logging test start and end timesThe system timezone of the machine running the tests8.What does ignoreHTTPSErrors: true in the use block do?It allows the app to make HTTP requests instead of HTTPSIt suppresses TLS/SSL certificate errors so tests can run against environments with self-signed or invalid certificatesIt disables HTTPS for all requests and forces them to use HTTPIt hides network errors from the test reporterSubmit answersarrow-left PreviousConfigurationProjectsNext arrow-right