Design Page Objects and run Tests with JavaScript
We have not used { page } fixture in the tests in test block like below
test('basic test', async ({ page }) =>
That's the reason screenshot and videos are not working and not captured.
Only Retries option works here.
I have posted the github issues at the bottom of this page. The tests are running fine with generating report and retries option.
Clone the repository
git clone https://github.com/JayKishoreDuvvuri/Playwright-Test-Runner.git
Install dependencies
Install Node modules: npm install
Run test
npm test
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
│
│
│── util.js # Confiuguration JavSacript File
│
│
├── pageobjects
│ ├──selectors.js # HTML and CSS identifier for elements to test
│
│
└─── Allure-test-report # Allure Test report for the tests executed
Allure-test-report : npm run generate-report
docker build -t playwright:v1 .
docker run -it playwright:v1
docker pull jaykishoreduvvuri/playwright:v1
docker run -it jaykishoreduvvuri/playwright:v1
https://github.com/microsoft/playwright/issues/8402
https://github.com/microsoft/playwright/issues/8354
https://github.com/microsoft/playwright/issues/8428