Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox, and WebKit with a single API. It is built to enable cross-browser web automation that is reliable and fast. Playwright, also has its own test runner for end-to-end tests called Playwright Test. Some of its other features include:

  • Can execute tests in parallel.

  • Provides context isolation out of the box.

  • Captures videos, screenshots, and other artifacts on failure.

  • Integrates your POM’s as extensible fixtures.

First off, You may need to install latest node and npm before installing playwright.

Step 1: Create your project folder and run the command at the root level:

npm init playwright

Step 2: Next, choose the language you want to use in your project – ‘Javascript’ or ‘Typescript’.

Step 3: Next, add the folder name where you want to keep your tests. By default, the folder name is ‘tests’.

Step 4: Next, choose if you want to add a Github Actions workflow to your project. By default, it is set to yes(Y). in our case we would select n

Step 5: Once It’s installed , you can open your code ide (VS code) to check the playwright project

Step 6: run your test

npx playwright test

Note: npx is the npm package runner CLI.

  • No labels