A command line interface to get screenshots from BrowserStack's Screenshot API


browserscreenshot uses the BrowserStack's Screenshot API to take screenshots from websites and downloads to your computer. It's great for automated tests to get a glance of your site in different browsers.

Note that this feature needs as of now, a "Regular" BrowserStack plan. Please, see BrowserStack for more details.

These are the parameters of the CLI

  -u, --username     The email you use to log in to Browserstack                                                            [required]
  -p, --password     Your account's password                                                                                [required]
  -w, --website      The website(s) from which you want to get screenshots. Comma separated list
  -b, --browser      The browser(s) from which you want to get screenshots. Comma separated list                            [default: "IE_8,IE_9,Chrome,Firefox"]
  -o, --orientation  Orientation of the device (portrait|landscape).                                                        [default: "portrait"]
  -s, --os           Operating System of the browser separating version with underscore (windows_xp). Comma separated list  [default: "windows_7"]
  -d, --device       The device(s) from which you want to get screenshots. Comma separated list
  -f, --folder       Folder in which screenshots will be stored                                                              [default: Current folder]
  -l, --ls           Instead of getting images, it will output a list of browsers and OS available
  -h, --help         Shows help info

You may think that website should be mandatory. Since every single browser you request is a paid request and it will consume from the total, if you don't provide any website you only will get the browsers to which you would submit the request. Try as many times as you want!

This is actually your email to log into your BrowserStack account

Password of your BrowserStack account

Comma separated list of the URL's you want to get screenshot's from.

For example:,

Or just one:

Browser from which you want to get an screenshot. By default they are:

  • Internet Explorer 8 & Internet Explorer 9
  • Chrome Latest
  • Firefox Latest

If you don't specify a version, it will suppose you wan't to get the latest one:

--browser ie

Will get you:

  • IE 10 Desktop - Windows 8
  • IE 10 normal - Windows 7

You can also get all of the versions from a browser, attaching _all:

--browser ie_all

Or a single version or a combination of them:

--browser ie_6,ie_7
  • IE 6 - Windows XP
  • IE 7 - Windows XP
  • safari
  • chrome
  • firefox
  • opera
  • ie
  • mobile safari
  • android browser

Just add " if you need to add spaces:

--browser "chrome,mobile safari_6.0"

Orientation is usefull for Mobile Devices, otherwise, it is not. However, the program will not allow you to pass anything that's not portrait or landscape. By default is portrait.

This is the Operating System in which you can request Screenshots. By default is Windows

--os "OS X"

The program is smart enough to know your intentions... some times. Let's say you want to get Firefox screenshots from Mac and screenshots from IE 8:

--os "OS X" --browser firefox,ie_8

Will get you:

  • Firefox 20 - Snow Leopard
  • Firefox 20 - Lion
  • Firefox 20 - Mountain Lion
  • IE 8 - Windows 7

You can specify the version with an underscore _:

--os "OS X_Mountain Lion" --browser firefox,ie_8
Operating SystemVersion
OS XSnow Leopard
OS XLion
OS XMountain Lion

The device from which you want to take a screenshot.

--device "iPhone 5"
BrowserDeviceOS Version
Mobile SafariiPad 2 (5.0)5.0
Mobile SafariiPhone 4S5.1
Mobile SafariiPad 3rd5.1
Mobile SafariiPhone 4S (6.0)6.0
Mobile SafariiPhone 56.0
Mobile SafariiPad 3rd (6.0)6.0
Android BrowserLG Nexus 44.2
Android BrowserSamsung Galaxy Tab 2 10.14.0
Android BrowserSamsung Galaxy Nexus4.0
Android BrowserMotorola Atrix HD4.0
Android BrowserMotorola Razr4.0
Android BrowserHTC Evo 3D4.0
Android BrowserHTC One X4.0
Android BrowserSony Xperia Tipo4.0
Android BrowserAmazon Kindle Fire 24.0
Android BrowserAmazon Kindle Fire HD 8.94.0
Android BrowserSamsung Galaxy Note 10.14.0
Android BrowserSamsung Galaxy S III4.1
Android BrowserSamsung Galaxy Note II4.1
Android BrowserMotorola Razr Maxx HD4.1
Android BrowserGoogle Nexus 74.1
Android BrowserSamsung Galaxy S II2.3
Android BrowserSamsung Galaxy Note2.3
Android BrowserMotorola Droid Razr2.3
Android BrowserMotorola Droid 42.3
Android BrowserSamsung Galaxy S2.2
Android BrowserHTC Wildfire2.2
Android BrowserLG Optimus 3D2.2

The folder in which you want to store the screenshots. By default is the folder in which you are invoking the process.

--folder /tmp

This option will ignore the rest of arguments and will output the list of browsers, versions and OS available so you have an idea of what is available.

Browser: ie
OS: windows
Versions: 6.0, 7.0, 10.0 Desktop, 8.0, 9.0, 10.0

##Development and Tests

npm install

Really thanks for the support shown from BrowserStack guys, they made this possible.