Git Product home page Git Product logo

pybrowserstack-screenshots's Introduction

pybrowserstack-screenshots

python api wrapper and client for Browserstack Screenshots API including PhantomCSS support. Starts screenshot jobs at Browserstack and downloads the screenshots when they are complete. Tests for visual regressions using PhantomCSS.

Note, you must have Screenshot API access enabled on your account.

Installation

  1. pip install pybrowserstack-screenshots

Usage

  1. Create a config file for the device/os/browser combinations you wish to screenshot. See example_config/ for examples.
  2. Start the browserstack job and download baseline screenshots:
python client.py --config <config_file> --auth <username:token>

Note that "auth" attribute (browserstack username and token) is optional. When not specified, values will be taken from "main_config.properties" where all configuration variables are stored.

PhantomCSS (experimental)

  1. Download baseline screenshots:
python client.py --config <config_file> --phantomcss
  1. Run client.py a second time to generate new screenshots
  2. Test for visual regressions between the two sets using PhantomCSS:
casperjs test comparator.js

client.py params

-a, --auth <username:token>
-c, --config <config_file>
-p, --phantomcss

other requirements

comparator.js requires casperjs: http://casperjs.readthedocs.org/en/latest/ If not initialised, the submodule PhantomCSS can be initialised with

git submodule update --init --recursive

For more information see http://www.browserstack.com/screenshots/api

For a full list of browsers: http://www.browserstack.com/screenshots/browsers.json

pybrowserstack-screenshots's People

Contributors

gvozdeva-ira avatar amitaibu avatar cmck avatar

Watchers

Alex Dong avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.