OpenFin Puppeteer Test on Testable


Check out the Getting Started with OpenFin guide for a quick introduction on how to run your test script. Also check out our Puppeteer overview guide to better understand how Puppeteer tests run on Testable in general.

This document goes into further detail on the various options provided for running OpenFin test scenarios via Puppeteer. We provide an example project: openfin-puppeteer-testable-example.

For the most part this is no different than any other Puppeteer test but as part of the launch options you pass the channel: 'openfin:[app-config-file]' which indicates to Testable which app config json to use to launch your application before your test starts. The app config file can either be a relative path within your uploaded files or a remote http(s) url.

// launches openfin using the uploaded app config file at app_sample.json and connects your Puppeteer session to it
const browser = await puppeteer.launch({ channel: 'openfin:app_sample.json' });

Version Mapping

For this to work you need to make sure you are using the version of Puppeteer which supports the Chromium version which your OpenFin application runs on. So for example OpenFin v31 corresponds to Chromium v112 which is supported by Puppeteer 19.8.0. Please refer to the OpenFin versions page if you’re trying to figure out which version to use and cross reference that against the Puppeteer version to Chromium version mappings.