Code Monkey home page Code Monkey logo

protractor-image-comparison's Introduction

protractor-image-comparison

dependencies Status Build Status Sauce Test Status

NPM

Sauce Test Status

##What can it do? protractor-image-comparison is a lightweight protractor plugin for browsers / mobile browsers / hybrid apps to do image comparison on screens or elements.

You can:

  • save or compare screens / elements against a baseline
  • NEW: save or compare a fullpage screenshot against a baseline (only browsers are currently supported)
  • NEW: disbale css animations by default
  • blockout custom regions during comparison (all)
  • increase the element dimenisions screenshots (all)
  • provide custom iOS and Android offsets for status-/address-/toolbar (mobile only)
  • automatically exclude a statusbar during screencomparison (mobile only)
  • NEW ignore anti-aliasing differences
  • NEW compare images by ignoring their colors (do a grayscale comparison)

Comparison is based on ResembleJS.

##Installation Install this module locally with the following command:

npm install protractor-image-comparison

Save to dependencies or dev-dependencies:

npm install --save protractor-image-comparison
npm install --save-dev protractor-image-comparison

##Usage protractor-image-comparison can be used for:

  • desktop browsers (Chrome / Firefox / Safari / Internet Explorer 11 / Microsoft Edge)
  • mobile / tablet browsers (Chrome / Safari on emulators / real devices) via Appium
  • Hybrid apps via Appium

For more information about mobile testing see the Appium documentation.

protractor-image-comparison provides:

  • two comparison methods checkScreen and checkElement.
  • two helper methods saveScreen and saveElement for saving images.
  • NEW two helper methods saveFullPageScreens and checkFullPageScreen for saving a fullpage screenshot.

The comparison methods return a result in percentages like 0 or 3.94. protractor-image-comparison can work with Jasmine and Cucumber.js. See Examples for or a protractor-config setup, or a Jasmine or a CucumberJS implementation.

More information about the methods can be found here.

Conventions

See conventions.md.

Contribution

See CONTRIBUTING.md.

Credits

TODO

  • Update documentation for Mobile
  • Update tests
  • New (mobile friendly) testpage
  • Add debug method
  • Add clean method to clean the given screenshotPath before running

protractor-image-comparison's People

Contributors

wswebcreation 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.