These are the Cypress (https://example.cypress.io/) sample tests, but they have been rewritten into Playwright (Python).
Be aware that some Cypress commands don't have an equivalent in Playwright, thus some workarounds are proposed whenever possible.
If you find a better solution or do you have an alternative solution to one of the tests, please share it with me by raising an issue.
-
Install Playwright for python.
-
Download the project
git checkout [email protected]:harmin-parra/playwright-python-examples.git
or download and unzip the zip file of the project
-
Enter the folder of the project
cd playwright-python-examples
-
Execute the test
-
with headless browser
pytest tests
-
with headed browser
pytest --headed tests
-