Design Page Objects and run Tests with JavaScript
Clone the repository
git clone https://github.com/JayKishoreDuvvuri/Playwright-Test-Runner-JavaScript.git
Install dependencies
npm install
npx playwright install
Run test
npm run test - For all browsers including Android and iOS tests
npm run test:chrome - For tests only on chrome browser
npm run test:mobile - For running mobile emulation tests on android and iOS
Folder Structure
├── ...
│
├── pages # Generic functionality for tests
│ |
│ ├── basePage.js # Base page testing functionality
│ ├── landingPage.js # Landing page testing functionality
│ ├── addToCartPage.js # Add To Cart page testing functionality
│ ├── productPage.js # Product page testing functionality
│
├── tests # Test suite
│ ├── addToCart.test.js # Automated Test Script
│ ├── productNames.test.js # Automated Test Script
│ ├── toggleProductColour.test.js # Automated Test Script
│
│
├── pageobjects
│ ├──selectors.js # HTML and CSS identifier for elements to test
│
│
└─── html-test-report # Playwright html test report for the tests executed
Html-test-report : npm run html-report
Repo: https://bitbucket.org/jaykishore96/test-automation-playwright/src/ui-test/
Pipelines: https://bitbucket.org/jaykishore96/test-automation-playwright/pipelines/results/page/1