Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

ngs-archives/hubot-browserstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hubot-browserstack

Build Status npm-version

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/d804f186e460dc4f2a30849a9686c3a8c4276c21

Installation

  1. Add hubot-browserstack to dependencies.
npm install --save hubot-browserstack
  1. Update 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.json

Then, 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.json

Make sure relative path will be resolved from process's working directory.

Author

Atsushi Nagase

License

MIT License