This repository contains several examples to help you run Puppeteer and utilize Testable as a remote browser grid.
- Set your API key:
export TESTABLE_KEY=xxx
. API keys can be generated by logging into Testable and going to Org Management => API Keys. - Switch to either the
browser
oropenfin
directory and runnpm install
to install any dependencies - Choose the example you want to run. For example:
node basic.js
to run the basic example.
The version of Puppeteer must match with the version of Chrome.
browser/basic.js
: A basic example that loads a page and takes a screenshotbrowser/all-options.js
: Includes all possible parameters that you can pass Testable when initializing the session.browser/testable-commands.js
: Includes an example for each custom command that Testable accepts around setting pass/fail, logging, metrics, and assertions.openfin/openfin.js
: An example that tests an OpenFin application. Note that the version of Puppeteer used matches the Chromium version that the OpenFin runtime wraps.