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.
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
- Log in as Admin / admin123 and assert the URL contains /dashboard.
- Assert the Dashboard heading is visible.
- In a second test, log in with a wrong password and assert the text "Invalid credentials" is shown.
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.
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. Commit
Your files go to labs/orangehrm-login/ in your repo.
- 2. Run
The Lab run workflow installs Playwright and runs your spec against the real site.
- 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.