Log in and save storage state
Medium70 pts
- storageState
- Session Persistence
- Authentication
Practice app · Acme Ops
A sign-in page with field validation and an authenticated dashboard.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Authenticate via the Acme Ops login form and persist browser storage state to a JSON file.
Your Task
- 1Navigate to the sign-in page at TEST_URL.
- 2Enter 'qa@target.dev' into the email field (#username) and 'Test@123' into the password field (#password).
- 3Click the sign-in button (#login-button).
- 4Assert that the dashboard container (#dashboard) is visible.
- 5Save the authenticated session storage state to disk (such as 'playwright/.auth/user.json').
Validation Checks
- Logs in with qa@target.dev and Test@123
- #dashboard is visible
- Calls context.storageState
- At least 1 assertion passes
Fixtures
- username
- qa@target.dev
- password
- Test@123
Playwright · QA Automation Practice Track · Authentication & storage state