This repository contains automated test scripts for Playwright assignments, providing a structured approach to testing with the following features:
-
**Test Scripts **
- All test scripts are organized under the
/tests
folder. - Scripts are placed in two folders. One folder contains the test files related to playwright Advanced under
/tests/playwright-advanced
and the other file contains test files that have used wordpress e2e-utils/tests/wp-e2e-utils-assignment
- All test scripts are organized under the
-
Page Object Model (POM)
- The project follows the Page Object Model design pattern.
- Page-specific classes and methods are located in the
/pages
folder.
-
Credentials
- Base url and the user credentials are stored in the
.env
file
- Base url and the user credentials are stored in the
- The tests are configured to run in headless mode, as specified in the
playwright.config.ts
andplaywright-2.config.ts
- The repository contains two config files as each of them represents configuration for different projects.
-
Ensure all dependencies are installed by running: npm install
-
Install playwright browsers npx playwright install
-
Execute the tests using the following command: npx playwright test tests/project-name --config=respective-config-file
- For troubleshooting or modifying test configurations, review the playwright.config.ts file.