Hello! This was a practice automation project using Cypress 12 following Page Object Model.
- To Prepare the environment please refer to the Environment Setup Guide.
Login Module
- Validate login page content
- Validate user cannot login without credentials
- Validate user cannot login with wrong credentials
- Fetch credentials from login page, validate login with valid credentials and logout
PIM Module
- Validate login to admin account
- Validate navigation to PIM Page
- Validate new employee creation page content and requirements
- Validate new employee creation with basic information and credentials
- Validate adding pesonal details
- Validate adding SSN & SIN
- Validate adding Blood Type
- Validate adding Attachment
- Validate logout
Time Module
- Validate login with employee account
- Validate navigation to Time Page
- Validate navigation to Attendence and Punch In
- Validate Punch In Information and Punch Out
- Validate navigation to My Records and available information
- Validate switching to My Time sheet & Edit information
- Validate logout
Data Cleanup
- Vadlidate login to admin account
- Validate navigation to PIM Page
- Validate Search for Employee & delete
- Validate logout
cypress_automation_3.mp4
- I used a great HRM website by OrangeHRM for this automation: https://opensource-demo.orangehrmlive.com/web/index.php/auth/login
- Cypress Documentations: https://docs.cypress.io/guides/overview/why-cypress
- Download and Install nodeJS from https://nodejs.org/en/download/
- Go to This PC → Properties → Advanced System Settings → Environment Variables → System Variables → Path
- Click edit and check if nodeJS is available for the path variable
- Open command prompt and run the following commmands and they should return a version number
- node --version
- npm --version
- Download and Install Visual Studio Code
- If package.json is not available run the following command npm -i init
- Then install cypress by running the following command npm install cypress --save -dev
- To open cypress use the following command npx cypress open
- To run your test cases through command prompt use the following commands npx cypress run # this will run the program in headless mode npx cypress run --headed # this will run the program in headed mode npx cypress run --spec cypress/e2e/mytest.cy.js --headed # this will run the defined specification file npx cypress run --spec cypress/e2e/mytest.cy.js --headed --browser chrome # this will run the defined specification file in the defined browser
- add "/// " to the command.js file in support which allows us to leverage VS Code Intellisense for the autocompletion
- To use Xpaths as locators in cypress we need to install a plugin (cypress-xpath) from https://github.com/cypress-io/cypress/tree/develop/npm/xpath after installation add "require('@cypress/xpath'); /// " to the command.js file in support