Playwright

Verify the error shown for a wrong password

Easy30 pts
  • Negative testing
  • Alerts (role=alert)
  • 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.

Test URL
/lab/playwright-shopzone-signin-wrong-password

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Write a negative login test: a known email with the wrong password must stay on the password step and show “Your password is incorrect”.

Your Task

  1. 1Open TEST_URL and go to the sign-in page (#nav-account).
  2. 2Enter buyer@shopzone.test and continue to the password step.
  3. 3Enter the wrong password WrongPass1 and click Sign in.
  4. 4Assert the alert #signin-error contains “Your password is incorrect” and the user is still on the sign-in page.

Validation Checks

  • The error alert says the password is incorrect.
  • The password step is still displayed.
  • The test asserts the error message.

Fixtures

Email
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_URL variable 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 3 acceptance checks and earn 30 points.

Playwright · Playwright Challenges Practice Track · ShopZone