QA
Fresher~10 minReal siteLocatorstoHaveURLtoHaveCount

Log in to Sauce Demo and verify the products page

Site: https://www.saucedemo.com, the real saucedemo.com, the public Sauce Labs demo store. Runs on GitHub Actions in your repo. Login: standard_user, locked_out_user, problem_user, performance_glitch_user / secret_sauce.

Next scenario →

Interview scenario

The interviewer opens saucedemo.com and says: "This is the site we use for screening. Log in as standard_user, prove you landed on the products page, and show me the locked-out user gets the error message. Run it for real, not in a mock."

Acceptance criteria

  1. Log in as standard_user / secret_sauce and assert the URL contains /inventory.html.
  2. Assert the Products title is visible and 6 inventory items are listed.
  3. In a second test, log in as locked_out_user and assert the error contains "locked out".
tests/example.spec.tsPlaywright · TypeScript

Runs with real Playwright on GitHub Actions in your own repo: the files are committed, the Lab run workflow starts with BASE_URL=https://www.saucedemo.com, and the results come back here. Saved in this browser. Ctrl/⌘ + Enter runs.

Real-site labs run on GitHub Actions in a repo created in your name. Sign in to run.Sign in with GitHub

Sauce Demo

Real site · runs on GitHub ActionsOpen the site ↗

https://www.saucedemo.com can't be embedded here, so your code runs with real Playwright and Chromium on a GitHub Actions runner in your repo. Explore the site in a new tab while you write the test. Login: standard_user, locked_out_user, problem_user, performance_glitch_user / secret_sauce.

  1. 1. Commit

    Your files go to labs/saucedemo-login/ in your repo.

  2. 2. Run

    The Lab run workflow installs Playwright and runs your spec against the real site.

  3. 3. Verify

    Results, assertion steps and the HTML report come back; the checks grade your code.

Test output

Press Run on GitHub to commit your code and run it against the real site. Results appear here in a few minutes.

Reference solution

Try it yourself first. Then compare with the Playwright solution and the same test in Selenium Java with TestNG.