Selenium WebDriver 4

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.

Test URL
/lab/qa-automation-submit-a-form-with-the-enter-key

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

  1. 1Open TEST_URL.
  2. 2Type “qa@target.dev” into #username and “Test@123” into #password.
  3. 3Send the Enter key to #password.
  4. 4Assert the URL ends with “#/dashboard” and #welcome-message reads “Welcome back, QA Tester”.

Acceptance criteria

  • The Enter key is sent
  • #login-button is not used
  • #dashboard is visible
  • At least 2 assertions pass

Constraints

  • Do not click #login-button.

Fixtures

username
qa@target.dev
password
Test@123

Selenium WebDriver 4 · QA Automation · Interactions