Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andreagrandi/playwright-demo
Demo usage of playwright and pytest-bdd
https://github.com/andreagrandi/playwright-demo
integration-testing playwright playwright-python pytest pytest-bdd python test-automation testing
Last synced: 26 days ago
JSON representation
Demo usage of playwright and pytest-bdd
- Host: GitHub
- URL: https://github.com/andreagrandi/playwright-demo
- Owner: andreagrandi
- License: mit
- Created: 2024-05-31T11:17:59.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-05-31T13:00:51.000Z (5 months ago)
- Last Synced: 2024-06-01T14:09:05.698Z (5 months ago)
- Topics: integration-testing, playwright, playwright-python, pytest, pytest-bdd, python, test-automation, testing
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# playwright-demo
Demo usage of `playwright` and `pytest-bdd`. I found a tutorial on these two libraries, but the code was difficult to read (shown with images instead of text) so I rewrote the example in a way that was easy to read, download and try locally. In addition to the existing test case, I also wrote a similar test case for a different website, to practice and learn better about elements selectors.# Installation
```bash
pip install -r requirements.txt
playwright install
```# Running tests
```bash
pytest --html=report.html
```# Features and Scenarios
This demo project contains the following features and scenarios:
- login tests for the [saucedemo.com](https://www.saucedemo.com/v1/) website
- login tests for the [practicetestautomation.com](https://practicetestautomation.com) website# References
- https://www.linkedin.com/pulse/bdd-automation-playwright-pytest-bdd-odyssey-sachith-palihawadana/
- https://playwright.dev/python/docs/writing-tests