Validate the mobile number on sign-up
- Form validation
- Negative testing
- Field errors
A fashion store with Men, Women and Kids listings: multi-select filters with removable chips, a custom sort listbox, load-more paging, product pages with colour swatches, sizes, a size-chart modal and a hover gallery, a wishlist, a bag with per-line sizes and a coupons modal, sign-up validation and checkout.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Submit the sign-up form with a mobile number that starts with 5, verify the field-level error, then correct the number and verify the account is created.
Your Task
- 1Open TEST_URL and click Sign up (#nav-profile).
- 2Fill #signup-name with “Priya Sharma”, #signup-mobile with 5123456789, #signup-email with priya.sharma@example.com and #signup-password with Style@2026.
- 3Click Create account (#signup-submit) and assert #signup-mobile-error says the number must start with 6, 7, 8 or 9, and that no email or password error is shown.
- 4Replace the mobile number with 9123456780 and submit again.
- 5Assert #signup-success welcomes Priya, shows +91 9123456780, and the header #nav-profile reads “Hi, Priya”.
Validation Checks
- The invalid mobile number was rejected with a field-level error.
- The account is created for 9123456780.
- The header greets Priya.
- The test makes at least two assertions.
Fixtures
- Coupons
- STYLE20 (20% off bags of ₹1,999 or more) · FIRST100 (₹100 off)
- Valid mobile
- 10 digits starting with 6, 7, 8 or 9, e.g. 9123456780
- Password rules
- 8+ characters with an uppercase letter, a number and a special character, e.g. Style@2026
- Seeded bag
- Floral Wrap Midi Dress (Pink, S) ×1 · Essential Crew Neck T-Shirt (Black, M) ×2 · Square Neck Crop Top (White, S) ×1
- Delivery address
- Rohan Mehta · 9876543210 · 400001 · Flat 12, Sea View Apartments · Mumbai · Maharashtra
Cloud Execution & Grading Guide
This Medium Selenium Challenges exercise runs inside TargetQA's managed cloud sandbox using Selenium WebDriver 4 (Java, Python, C#). Every submission runs inside an isolated headless Chromium container with pre-synced drivers, capturing live console logs, DOM assertions, and a 720p step-by-step video replay.
- Supported stacks: Java (Selenium 4 + JUnit 5) · Python (Selenium 4 + pytest) · C# (Selenium 4 + NUnit)
- Zero local setup: Use the pre-declared
TEST_URLvariable so your script targets the live StyleKart sandbox reliably without hardcoding hosts. - Automated grading: Click Run to inspect step logs and behavior, then click Submit to validate all 4 acceptance checks and earn 50 points.
Selenium WebDriver 4 · Selenium Challenges Practice Track · StyleKart