Skip to content

applitools/example-eyes-playwright-fixture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Applitools Example: Playwright in TypeScript (with fixtures - the best practice)

This is the example project for the Playwright TypeScript tutorial. It shows how to start automating visual tests with Applitools Eyes and Playwright in TypeScript.

It uses:

It can also run tests with:

To run this example project, you'll need:

  1. An Applitools account, which you can register for free
  2. A recent version of Node.js
  3. A good TypeScript editor like Visual Studio Code

Installation

Install dependencies and set up Playwright:

npm install
npx playwright install

Environment Variables

Set the APPLITOOLS_API_KEY environment variable to your account's API key. You can do this by creating a .env file in the project root:

APPLITOOLS_API_KEY=your_api_key_here

If you are using a dedicated Applitools cloud, you can also set:

APPLITOOLS_SERVER_URL=https://your-server-url.applitools.com

Running Tests

To run all tests:

npx playwright test

To run Playwright in UI mode:

npx playwright test --ui

Main Test Case

The main test case spec is example.spec.ts. By default, the project will run tests using Applitools Eyes.

Test reports are generated in the playwright-report/ directory.

More Information

For full instructions on running this project, see the Playwright TypeScript tutorial!

About

Applitools Example: Playwright Fixture with Typescript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published