Control the player with keyboard shortcuts
Medium55 pts~2 min
- Keyboard actions
- Focus
- Dialogs
- State verification
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
Use only the keyboard to drive the video player: open the shortcuts help, start playback, seek forward 30 seconds and mute.
Your task
- 1Open TEST_URL. You are signed in as Maya on the browse page.
- 2Click Play on the billboard (#hero-play), then click the video area (#player-screen) to focus the player.
- 3Press ? and assert the #shortcuts-help dialog lists “Forward 10 seconds”. Press Escape to close it.
- 4Press K and assert #player-status reads “Playing”.
- 5Press the Right arrow key three times, then press M.
- 6Assert #mute-status reads “Muted” and #player-time shows at least 0:30.
Acceptance criteria
- The shortcuts dialog was opened and closed.
- Playback was started with K and is playing.
- The position was moved forward 30 seconds with the Right arrow key.
- The sound is muted.
- The test makes at least three 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)
Playwright · Playwright Challenges · StreamFlix