Validate the registration form errors
Medium50 pts~2 min
- Form validation
- Field errors
- Multiple assertions
Practice app · ShopZone
A full marketplace: two-step sign-in, search with filters and sorting, product pages with tabs, a cart with coupons, and checkout.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Submit the Create account form with invalid data and verify every field-level validation message.
Your task
- 1Open TEST_URL, go to sign-in and click “Create your ShopZone account” (#create-account).
- 2Fill #reg-name with “Ravi Kumar”, #reg-email with “ravi.kumar” (no domain), #reg-password with “short” and #reg-confirm with “different”.
- 3Click #reg-submit.
- 4Assert #reg-email-error, #reg-password-error and #reg-confirm-error show the expected messages, and that #reg-name-error is not shown.
Acceptance criteria
- The email error says “Enter a valid email address”.
- The password error mentions the 8-character minimum.
- The confirmation error says the passwords must match.
- The test makes at least three assertions.
Fixtures
- buyer@shopzone.test
- Password
- Shop@123
- Account name
- Asha Verma
- Coupon
- SAVE10 (10% off the subtotal)
- Pincodes
- 560001 Bengaluru · 110001 New Delhi · 400001 Mumbai · 600001 Chennai
Selenium WebDriver 4 · Selenium Challenges · ShopZone