Submit a form with the enter key
Easy30 pts~12 min
- Keyboard
- Form submission
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
Sign in by pressing Enter in the password field instead of clicking the button.
Your task
- 1Open TEST_URL.
- 2Type “qa@target.dev” into
#usernameand “Test@123” into#password. - 3Send the Enter key to
#password. - 4Assert the URL ends with “#/dashboard” and
#welcome-messagereads “Welcome back, QA Tester”.
Acceptance criteria
- The Enter key is sent
#login-buttonis not used#dashboardis visible- At least 2 assertions pass
Constraints
- Do not click
#login-button.
Fixtures
- username
- qa@target.dev
- password
- Test@123
Selenium WebDriver 4 · Selenium · Interactions