This is the example project for the Puppeteer JavaScript tutorial. It shows how to start automating visual tests with Applitools Eyes and Puppeteer in JavaScript.
It uses:
- JavaScript as the programming language
- Puppeteer for browser automation
- Mocha as the core test framework
- Chromium as the local browser for testing
- npm for dependency management
- Applitools Eyes for visual testing
It can also run tests with:
- Applitools Ultrafast Grid for cross-browser execution
To run this example project, you'll need:
- An Applitools account, which you can register for free
- A recent version of Node.js
- A good JavaScript editor like Visual Studio Code
To install dependencies, run:
npm install
When this command installs Puppeteer, it will also automatically install Chromium.
The main test case spec is acme-bank.test.js
.
By default, the project will run tests with Ultrafast Grid.
You can change these settings in the test file.
To execute tests, set the APPLITOOLS_API_KEY
environment variable
to your account's API key,
and then run:
npm test
For full instructions on running this project, take our Puppeteer JavaScript tutorial!