Apply a coupon code and verify the discounted total
Medium50 pts~2 min
- Forms
- Calculated values
- 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
Apply the coupon SAVE10 to the pre-filled cart and verify the 10% discount is reflected in the order total.
Your task
- 1Open TEST_URL and open the cart.
- 2Optionally verify that an invalid code (for example SAVE99) is rejected.
- 3Enter SAVE10 in #coupon-input and click Apply (#apply-coupon).
- 4Assert #coupon-message confirms SAVE10, the discount row is visible and #cart-total shows $88.64.
Acceptance criteria
- The coupon message confirms SAVE10 was applied.
- A discount row is shown.
- The order total is $88.64.
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