Skip to content

dreamquality/starter-ts-playwright

Repository files navigation

🎭 Playwright

Boilerplate project for Web Test Automation - Playwright

General requirements

Download and install

  • Latest version of Node.js
  • Java Development Kit (JDK)
    • Make sure you have the environment variable JAVA_HOME set to the path of the respective JDK. (Required for Allure report generation).

Installation of the testing framework

Clone the repository:

git clone https://github.com/charlyautomatiza/starter-playwright.git

Install dependencies.

npm install

To run the tests go to the root of the project and run (headless mode)

npm run test

To run the tests go to the root of the project and run (headed mode)

npm run test-head

To run the tests only on Firefox

npm run firefox

To run the tests only on Chromium

npm run chromium

To run the tests only on Webkit

npm run webkit

To open Playwright's unified Html report of test results

npm run play-report

To create and open the Allure unified report of test results

npm run open-report

IMPORTANT

After each upgrade of Playwright, the project must be restarted locally with the command:

npm run reinstall

To download the latest versions of the Browsers..

Article with explanations

Page Object, Page Factory