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.
pip install -r requirements.txt
playwright install
pytest --html=report.html
This demo project contains the following features and scenarios:
- login tests for the saucedemo.com website
- login tests for the practicetestautomation.com website