Unlock the Kids profile with a four-digit PIN
Medium50 pts~2 min
- OTP-style inputs
- Focus management
- Negative testing
- Assertions
Practice app · StreamFlix
A dark-themed streaming service: sign-in, a “Who's watching?” picker with a PIN-locked Kids profile, paged browse carousels with hover cards, title details with seasons, debounced search, My List, a video player with shortcuts and a Skip intro button, a trailer iframe and plan selection.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
The Kids profile is protected by a PIN typed into four single-digit boxes. Prove a wrong PIN is rejected, then unlock the profile with the correct PIN and verify Kids mode is active.
Your task
- 1Open TEST_URL. You are signed in and see the “Who's watching?” screen.
- 2Click the Kids profile (#profile-kids) and wait for the PIN dialog (#pin-dialog).
- 3Click the first box (#pin-1) and type 1111. The focus moves to the next box after each digit and the PIN is checked after the fourth.
- 4Assert #pin-error says “Incorrect PIN”.
- 5Type the correct PIN 2580 into the boxes (the first box has the focus again).
- 6Assert the dialog closed, the header profile switcher #current-profile shows “Kids” and the #kids-banner is visible.
Acceptance criteria
- A wrong PIN shows the “Incorrect PIN” error.
- The correct PIN 2580 opens the Kids profile and closes the dialog.
- The header shows the Kids profile and the Kids banner is displayed.
- The test makes at least two assertions.
Fixtures
- viewer@streamflix.test
- Password
- Stream@2026
- Profiles
- Maya · Leo · Kids (PIN locked)
- Kids PIN
- 2580
- Plans
- Basic $7.99 · Standard $15.49 (current) · Premium $22.99 per month
- Featured series
- Northbound Signal (3 seasons: 6, 8 and 4 episodes)
Selenium WebDriver 4 · Selenium Challenges · StreamFlix