Page Object Model automation testing solution implemented using Playwright
This is a personal project to develop automated testing solution for demo e-commerce website Luma Magento (https://magento.softwaretestingboard.com).
Built using Node.JS and Playwright with POM approach.
The website is divided into pages as below:
-Homepage
-Product Listing Page
-Product Description Page
-Cart Page
-Checkout Page
The methods to interact with the elements and element locators are present in each page object class.
Refer https://playwright.dev/docs/intro for more details
Below softwares or tools needs to be installed to execute the tests
Software/Tool | Version |
---|---|
Latest | |
Latest Stable Version |
Run all the tests
npx playwright test --headed
Run single test
npx playwright test <filepath> --headed --project "<browser>"
file path is path to test script
Ex: ./tests/addToCartAndOrder.spec.ts
browser can be one of below
Google Chrome | |
---|---|
Firefox | |
Microsoft Edge | |
Safari |
Test report can be viewed by executing
npx playwright show-report
Browser and tools/software images are obtained via Wikimedia Commons (https://commons.wikimedia.org/wiki/Main_Page)