PlaywrightJS Tutorial

PlaywrightJS Tutorial

  • Docs

›Setup

Setup

  • PlaywrightJS Installation
  • Install Mocha and Chai
  • Installation Test

First Steps

  • Create a PlaywrightJS Test
  • Using Mocha and Chai

The Playwright Library

  • The Browser Object
  • The Context Object
  • The Page Object
  • Selectors
  • Navigation
  • Interactions
  • Auditing

Using PlayWright on web pages

  • A real world case

Code Generation

  • Code Generation

Cookbook

  • Timers
  • Using SQL
  • Database Connection
  • Email Setup

Install Mocha and Chai

Mocha Installation

This command will install the Mocha library, a JavaScript testing framework for asynchronous testing, to run serial tests and reporting.

playwright_test > npm i mocha

It's useful to install Mocha globally, to be used directly on the command line:

playwright_test > npm i -g mocha

Chai Installation

This command will install the Chai library, an assertion library, which provide many assertion functions to validate the test process.

playwright_test > npm i chai
← PlaywrightJS InstallationInstallation Test →
  • Mocha Installation
  • Chai Installation