0.1.6 • Published 11 years ago
hubot-browserstack v0.1.6
hubot-browserstack
A Hubot script to take screenshots with BrowserStack.
me > hubot screenshot me http://www.google.com/
hubot > Started generating screenshots in http://www.browserstack.com/screenshots/d804f186e460dc4f2a30849a9686c3a8c4276c21Installation
Add
hubot-browserstackto dependencies.npm install --save hubot-browserstackUpdate
external-scripts.json["hubot-browserstack"]
Setup
Account
Grab your BrowserStack Username and Access Key from Your Account > Automate.
HUBOT_BROWSER_STACK_USERNAME=$(Your BrowserStack Username)
HUBOT_BROWSER_STACK_ACCESS_KEY=$(Your BrowserStack Access Key)Settings
You can set custom settings to generate screenshots.
Firstly, set the file path for Browserstack settings.
HUBOT_BROWSER_STACK_SETTINGS=$HOME/data/mysettings.jsonThen, put a json in the file.
{
"callback_url": "http://staging.example.com",
"win_res": "1024x768",
"mac_res": "1920x1080",
"quality": "compressed",
"wait_time": 5,
"orientation": "portrait",
}You can find available parameters on Browserstack Official API Docs
Browser
Default browsers are listed in browsers.json of this module.
If you prefer other browsers, you can specify JSON path with HUBOT_BROWSER_STACK_DEFAULT_BROWSERS.
HUBOT_BROWSER_STACK_DEFAULT_BROWSERS=$HOME/data/mybrowers.jsonMake sure relative path will be resolved from process's working directory.