This is a training repository for automated web testing using Python, Pytest, and Playwright.
To use this repository, you need to have the following software installed on your machine:
- Python 3.7 or higher
- Node.js (required by Playwright)
- Pytest (pip install pytest)
- Playwright (pip install pytest-playwright)
- Clone the repository: git clone https://github.com/xurten/python-pytest-playwright-training.git
- Install the dependencies: pip install -r requirements.txt
- Download the correct version of the browser executable for your system (see here for details)
- Update the conftest.py file with the path to your browser executable.
This repository contains the following directories:
- pages: This directory contains the Page Object Model (POM) classes that represent the pages of the tested website. Each file in this directory corresponds to a single web page, and defines a POM class for that page.
- tests: This directory contains the test files. Each file in this directory corresponds to a single feature or scenario, and contains one or more test cases.
- utils: This directory contains utility functions used by the tests.
See branch: async_version
pytest --headed --slowmo 1000 -n 6 --html=report.html --self-contained-html --capture=tee-sys -m regression
For html report add:
--template=html1/index.html --report=report.html
If you would like to contribute to this project, feel free to open a pull request or an issue. All contributions are welcome!