Add an employee through a PIM page object, with unique test data
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
"The PIM module is where most of our regression lives. Build a LoginPage and a PimPage, a fixture that logs in as Admin, and a test that adds a new employee with a unique name and proves the personal details page shows it. The demo database is shared with the whole internet, so your data must not collide."
Acceptance criteria
- pages/login.page.ts exports LoginPage with goto() and login(username, password).
- pages/pim.page.ts exports PimPage with addEmployee(firstName, lastName) and employeeName() (the heading on the personal details page).
- fixtures.ts extends test with a pim fixture that logs in and opens the Add Employee page.
- tests/employee.spec.ts adds an employee whose last name contains a unique suffix (for example Date.now()) and asserts the heading shows the full name.
🔒 This lab is part of Pro
Pro unlocks the live editor, the scenario checks and the reference solutions in Playwright and Selenium Java for all 25 labs, plus every interview answer. One payment of ₹1,299, lifetime access. Already on a lower tier? Upgrade for the difference.