Update quantities and remove an item from the cart
Medium50 pts~2 min
- Scoped locators
- Data attributes
- Recalculated totals
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
The cart already contains three products. Raise the desk lamp to 3 units, delete the mug, and verify the recalculated subtotal.
Your task
- 1Open TEST_URL and open the cart (#nav-cart).
- 2In the Aurora Desk Lamp row (data-product-id="aurora-lamp") click + until the quantity is 3.
- 3Delete the Pixel Ceramic Mug row.
- 4Assert 2 rows remain and #cart-subtotal shows Subtotal (4 items): $143.49.
Acceptance criteria
- Two cart rows remain.
- The lamp quantity is 3.
- The subtotal is $143.49 for 4 items.
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