Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History

playwright-js

Getting started with Playwright

Included is a full setup for our recommended way of using Sauce Visual with Playwright using a custom fixture in login.spec.ts. We also include a no-fixture.spec.ts showing how to use Sauce Visual without a fixture if you have a mature codebase and don't want to change in bulk, or just want to test Visual out in a few key areas first.

Prerequisites

  • A device with NodeJS 18+ Support
  • Sauce Labs Account

Run the demo

  • Install & setup npm dependencies:
npm install
# On your first run, you'll also need to do a one-time setup with Playwright:
npx playwright install
export SAUCE_USERNAME=__YOUR_SAUCE_USER_NAME__
export SAUCE_ACCESS_KEY=__YOUR_SAUCE_ACCESS_KEY__
# You can change the region to upload to via the SAUCE_REGION env variable. See the
# docs for more details on how to customize your run.
  • Run the test
npm run sauce-visual

Installation & Usage

View installation and usage instructions on the Sauce Docs website.