Skip to content

Example scripts to use Testable as a remote browser grid with Playwright

License

Notifications You must be signed in to change notification settings

testable/playwright-remote-examples

Repository files navigation

Playwright + Testable Examples

This repository contains several examples to help you run Playwright and utilize Testable as a remote browser grid.

Steps to Run

  1. Set your API key: export TESTABLE_KEY=xxx. API keys can be generated by logging into Testable and going to Org Management => API Keys.
  2. Run npm install to install any dependencies
  3. Choose the example you want to run. For example: node basic.js to run the basic example.

Examples

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 screenshot
  • all-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 screenshot
  • all-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.

About

Example scripts to use Testable as a remote browser grid with Playwright

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published