QA
Junior~10 minReal siteAuto-waitingNegative test

OrangeHRM login: happy path and invalid credentials

Site: https://opensource-demo.orangehrmlive.com, the real OrangeHRM open-source demo at opensource-demo.orangehrmlive.com. Runs on GitHub Actions in your repo. Login: Admin / admin123.

Next scenario →

Interview scenario

"Our client runs OrangeHRM. Automate the login against the public demo: Admin can log in and lands on the dashboard, and a wrong password shows 'Invalid credentials'. The demo is slow, so handle waiting properly, no sleeps."

Acceptance criteria

  1. Log in as Admin / admin123 and assert the URL contains /dashboard.
  2. Assert the Dashboard heading is visible.
  3. In a second test, log in with a wrong password and assert the text "Invalid credentials" is shown.
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://opensource-demo.orangehrmlive.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

OrangeHRM demo

Real site · runs on GitHub ActionsOpen the site ↗

https://opensource-demo.orangehrmlive.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: Admin / admin123.

  1. 1. Commit

    Your files go to labs/orangehrm-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.