Practice · Automation

Automation playground

Point Playwright, Selenium or Cypress at this page. Each card has an element that trips people up in real projects, and a task to automate. Most elements have a data-testid, but try role and label locators first.

Page URL for your tests: https://testqualityhub.com/practice/automation-playground/

1. Login form

Task: log in with practice / Test@123 and assert the welcome text. Then assert the error for a wrong password.

3. Checkboxes and radio buttons

Task: tick "API" and "Mobile", choose "Remote", and assert the summary. Then untick "API".

Areas you test
Work type

Areas: none · Work: none

4. Web table

Task: find Chen Wei's salary by name, not by row number. Filter by "Toronto" and assert 2 rows. Click the Salary header and assert the rows are sorted.

Aisha KhanQA EngineerToronto$82,000
Ben CarterDeveloperLondon$91,000
Chen WeiQA LeadSingapore$105,000
Diego RuizProduct OwnerMadrid$88,000
Emma StoneSDETToronto$97,000
Farah AliDeveloperDubai$86,000
George BrownQA EngineerSydney$79,000
Hina RazaSDETLahore$64,000

8 rows

5. Dynamic loading

Task: click "Load users" and assert the list. It takes 1–4 seconds, a different time on every click. Do not use a fixed sleep.

6. Disabled until ready

Task: click "Enable", wait for the input to become enabled, type into it and save.

7. Alerts, confirms and prompts

Task: accept the confirm, dismiss it, and answer the prompt with your name. Register the dialog handler before you click.

8. iframe

Task: type into the input inside the frame, click Send and assert the text. UseframeLocator (Playwright) or switchTo().frame() (Selenium).

9. Shadow DOM

Task: fill the input inside the shadow root and click Subscribe. Playwright pierces open shadow roots; in Selenium use getShadowRoot().

10. New tab

Task: click the link, switch to the new tab, assert its heading is "Learn by testing real apps", then close it and return.

Open practice apps in a new tab

11. Hover menu

Task: hover over "Account" and click "Settings" in the menu that appears.

12. File upload

Task: upload any file with setInputFiles and assert its name is shown.

13. Dynamic ID

Task: this button gets a new id on every page load. Click it three times with a locator that does not use the id, and assert the count.

Clicked 0 times

14. Drag and drop

Task: drag "Bug report" into the Done box and assert the message.

🐞 Bug report
Done