Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

protractor-image-comparison

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protractor-image-comparison

npm-module to compare images with protractor

  • 0.1.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.4K
increased by8.03%
Maintainers
1
Weekly downloads
 
Created
Source

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:

  • compare screens / elements against a baseline
  • 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.

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

Keywords

FAQs

Package last updated on 05 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc