Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xurten/python-pytest-playwright-training
This is a training repository for automated web testing using Python, Pytest, and Playwright.
https://github.com/xurten/python-pytest-playwright-training
automation playwright python
Last synced: 13 days ago
JSON representation
This is a training repository for automated web testing using Python, Pytest, and Playwright.
- Host: GitHub
- URL: https://github.com/xurten/python-pytest-playwright-training
- Owner: xurten
- Created: 2022-08-17T14:55:58.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-23T17:01:40.000Z (about 1 year ago)
- Last Synced: 2024-11-23T11:16:12.275Z (2 months ago)
- Topics: automation, playwright, python
- Language: Python
- Homepage:
- Size: 120 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python Pytest Playwright Training
This is a training repository for automated web testing using Python, Pytest, and Playwright.## Prerequisites
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)## Installation
1. Clone the repository: git clone https://github.com/xurten/python-pytest-playwright-training.git
2. Install the dependencies: pip install -r requirements.txt
3. Download the correct version of the browser executable for your system (see here for details)
4. Update the conftest.py file with the path to your browser executable.## Structure
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.## Async version
See branch: async_version## Run the tests
```python
pytest --headed --slowmo 1000 -n 6 --html=report.html --self-contained-html --capture=tee-sys -m regression
```
For html report add:
```python
--template=html1/index.html --report=report.html
```## Example tests results
![image](https://user-images.githubusercontent.com/7273568/224503717-e861b105-7b73-4a5e-bae7-b3f43c22d72d.png)## Contributing
If you would like to contribute to this project, feel free to open a pull request or an issue. All contributions are welcome!