Skip to content

Repository files navigation

SetUp Guide

  1. Install node.js (u will get npm by default)

  2. install vscode

  3. create project folder open in vscode

  4. install latest playwright version --- npm init playwright@latest choose the language u want to use

  5. folder structure: - package.json -- node project management file playwright.config.js -- playwright configuration tests -- all the playwright tests

  6. Playwright uses webSocket(WS) protocol to interact with server while selenium/appium uses http protocol

By default all the test run in HeadlessMode

Run test in all three browsers:

  1. To run all the test under tests folder npx playwright test

  2. To run specific test file npx playwright test HomePageTest.spec.js

Run test in a specific browser:

  1. To run all the test under tests folder npx playwright test --project=chromium

  2. To run specific test file npx playwright test HomePageTest.spec.js --project=chromium

To show reports npx playwright show-report

To run the test in headed mode

npx playwright test HomePageTest.spec.js --project=chromium --headed

To run the test in headed as well as debug mode

npx playwright test HomePageTest.spec.js --project=chromium --headed --debug

To use playwright test generator to play and generate and code

npx playwright codegen

check npx playwright codegen -help for all the available option

About

Playwright Automation with Javascript

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages