Selenium WebDriver 4

Test email and password format rules

Medium70 pts~25 min
  • Validation
  • Boundary testing
Practice app · Workshop Registration

A registration form with text fields, radios, checkboxes, selects and validation.

Test URL
/lab/selenium-test-email-and-password-format-rules

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Exercise the email and password format rules and assert each specific message.

Your task

  1. 1Open TEST_URL, fill #first-name and #last-name, type “not-an-email” into #email and “abc” into #password, then click #submit-button.
  2. 2Assert #email-error reads “Enter a valid email address” and #password-error reads “Password must be at least 8 characters”.
  3. 3Clear #password, type “abcdefgh” and submit again.
  4. 4Assert #password-error reads “Password must contain at least one number”.

Acceptance criteria

  • #email-error reads “Enter a valid email address”
  • #password-error reads “Password must contain at least one number”
  • At least 3 assertions pass

Selenium WebDriver 4 · Selenium · Forms & inputs