Add two units of a product to the cart
Easy30 pts
- Navigation
- Dropdowns
- State changes
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
Open the Nimbus X2 Wireless Headphones product page, choose a quantity of 2, add it to the cart and verify the cart badge.
Your Task
- 1Open TEST_URL and open the Nimbus X2 Wireless Headphones from Today's Deals (or search for it).
- 2Select 2 in the Quantity dropdown (#quantity-select).
- 3Click Add to Cart (#add-to-cart).
- 4Assert the cart badge #cart-count shows 2.
Validation Checks
- The cart badge shows 2 items.
- The test asserts the badge value.
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
Cloud Execution & Grading Guide
This Easy Playwright Challenges exercise runs inside TargetQA's managed cloud sandbox using Playwright (TypeScript, JavaScript, Python, Java, 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: TypeScript (@playwright/test) · JavaScript (@playwright/test) · Python (Playwright + pytest) · Java (Playwright for Java + JUnit 5) · C# (Playwright for .NET + NUnit)
- Zero local setup: Use the pre-declared
TEST_URLvariable so your script targets the live ShopZone sandbox reliably without hardcoding hosts. - Automated grading: Click Run to inspect step logs and behavior, then click Submit to validate all 2 acceptance checks and earn 30 points.
Playwright · Playwright Challenges Practice Track · ShopZone