This repo is used to demo various testing scenarios with Playwright 🎭, using the official test-runner and scripts authored in TypeScript.
The test.yml GitHub Action workflow is used to:
Run Playwright example tests
android - runs a basic test using Android's WebView.
basic - basic tests to show interactions, element selectors, assertions, upload files, read a response, mock a response, and page object model (POM).
chrome-extension - basic test that gets a handle to the background page of Chrome extension.
drag-and-drop - runs example drag-and-drop test utilizing https://www.w3schools.com/html/html5_draganddrop.asp.
github-api - uses GitHub API to test creation of a new repo, bug, and feature, then deletion of repo.
visual-comparison - visually compares snapshots with golden screenshots and text content for playwright.dev landing page.
Publish each HTML report to their respective directory
When the above tests are finished, the results are published to GitHub pages:
The baseURL value for most tests is set via .env file that you'll find at the root of each folder. Typically this file is gitignored; by including it in this demo repo, it makes running and sharing these tests easier.
Have a testing scenario you'd like to see included?
Please open an issue with details.