Launchpad
You can launch browsers! With NodeJS!
- Local browsers for MacOS, Windows and Linux (like) operating systems
- BrowserStack browsers using the BrowserStack API
API
The general API for any launcher (<type>
) looks like this:
var launch = ;launch<type>configuration { launcher; ; launcher<browsername>url { // Same as above };};
Local launchers
Local launchers look up all currently installed browsers (unless limited by LAUNCHPAD_BROWSERS - see below for details) and allow you to start new browser processes.
// Launch a local browserlaunch;
Environment variables impacting local browsers detection
By default Launchpad looks up all installed browsers. To speed-up this process you can define the following env variables:
LAUNCHPAD_BROWSERS
- comma delimited list of browsers you want to use, e.g.LAUNCHPAD_BROWSERS=chrome,firefox,opera
. Other browsers will not be detected even if they are installed.LAUNCHPAD_<browser>
- specifies where given browser is installed so that Launchpad does not need to look for it, e.g.LAUNCHPAD_CHROME=/usr/bin/chromium
The following browser names are recognized: chrome
, firefox
, safari
, ie
, edge
, opera
, canary
, aurora
, electron
, phantom
, nodeWebKit
.
Not all platforms support all browsers - see platform for details.
Browserstack
BrowserStack is a great cross-browser testing tool and offers API access to any account that is on a monthly plan. Launchpad allows you to start BrowserStack workers through its API like this:
launch;
Behind the scenes we have the node-browserstack module do all the work (API calls) for us.