- Clone this repository to your local machine using Git:
git clone https://github.com/qasimmahmood95/playwright-demo-ts.git
- Navigate to the project directory:
cd playwright-demo-ts- Install the project dependencies:
npm installYou can run my solution using:
npx playwright test-
Page Object Model
I'm following how the Playwright docs recommed implementing POM. That is, I have all my locators in a constructor in a Page file
I then created separate functions to interact with each locator. This isn't strictly necessary, but I find this abstraction makes for much nicer-looking and more readable tests
-
HTML Report
This is an artifact I'm publishing in the GitHub Actions workflow after the tests finish.
-
Manual & Automatic CI Trigger
The tests will automatically run when you push new code to main or create a new PR to merge into main.
You can also use the manual trigger to run the tests from GitHub Actions directly.
-
Fixtures
Coming soon!
-
Accessibility (a11y) testing
Coming soon!