This repository contains several examples to help you run Playwright 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. - Run
npm install
to install any dependencies - Choose the example you want to run. For example:
node basic.js
to run the basic example.
Examples are provided both for connecting via CDP (Chrome DevTools Protocol) as well as with a Playwright websocket.
CDP Examples:
basic.cdp.js
: A basic example that loads a page and takes a screenshotall-options.cdp.js
: Includes all possible parameters that you can pass Testable when initializing the session.testable-commands.cdp.js
: Includes an example for each custom command that Testable accepts around setting pass/fail, logging, metrics, and assertions.
Playwright WebSocket Examples:
basic.js
: A basic example that loads a page and takes a screenshotall-options.js
: Includes all possible parameters that you can pass Testable when initializing the session.testable-commands.js
: Includes an example for each custom command that Testable accepts around setting pass/fail, logging, metrics, and assertions.