Testing · Middle · Question 48 of 75
How do you avoid logging in through the UI in every Playwright test?
- ✓Correct answer: Log in once in a setup project, save
storageStateto a file and reuse it in tests - 2Disable authentication in the app for tests
- 3Run all tests in one big test
Explanation
The saved cookies and localStorage are loaded into each new browser context.