This repository automates the login functionality of the OrangeHRM demo website using APIs and Playwright with TypeScript. It demonstrates a robust, scalable, and easy-to-maintain testing solution.
- API-based authentication for login automation.
- Leverages Playwright’s capabilities for testing.
- Written in TypeScript for modern, type-safe development.
- Modular and reusable code structure.
- Node.js (version 16 or later).
- Playwright installed globally or locally.
- Clone the repository:
git clone <repository-url> cd <repository-folder>
- Install dependencies:
npm install
- Ensure Playwright is set up:
npx playwright install
- src/: Contains the source code.
- api/: API utilities and helper functions.
- tests/: Test cases for login and validation.
- playwright.config.ts: Playwright configuration.
- Run API authentication and login tests:
npx playwright test - Generate a test report:
npx playwright show-report
- Modify test cases in the
src/testsfolder as per requirements.
For questions or support, contact [[email protected]].