Junior~10 minselectOptionallTextContentsData assertions
Sort by price and verify the order
App: SwagShop, a practice e-commerce demo store (Saucedemo-style). Login: standard_user, locked_out_user, problem_user, performance_glitch_user / secret_sauce.
Interview scenario
"Product says sorting by price is broken for some users. Write a test that sorts by Price (low to high) and verifies the whole list is really in ascending order, not just the first item."
Acceptance criteria
- Log in as standard_user.
- Choose "Price (low to high)" in the sort dropdown.
- Read every price on the page, convert them to numbers and assert they are sorted ascending.
- Bonus: run the same test as problem_user and watch it catch the bug.
🔒 This lab is part of full access
Unlock the live editor, the scenario checks and the reference solutions in Playwright and Selenium Java for all 25 labs, plus every interview answer. One payment of ₹999, lifetime access.