Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
protractor-image-comparison
Advanced tools
DUE TO CHROME REMOVING THE
disable-infobars
IN CHROME 65 MANY AUTOMATED VISUAL TESTS ON CHROME FAIL. I'M WORKING ON A SOLUTION FOR PROTRACTOR-IMAGE-COMPARISON. SORRY FOR THE INCONVENIENCE
protractor-image-comparison is a lightweight protractor plugin for browsers / mobile browsers / hybrid apps to do image comparison on screens or elements.
You can:
saveAboveTolerance
that prevents saving result image to diff folder, tnx to IgorSasovets**Comparison is based on ResembleJS.
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
protractor-image-comparison can be used for:
For more information about mobile testing see the Appium documentation.
If you run for the first time without having a baseline the check
-methods will reject the promise with the following warning:
`Image not found, saving current image as new baseline.`
This means that the current screenshot is saved and you manually need to copy it to your baseline.
If you instantiate protractor-image-comparsion
with autoSaveBaseline: true
, see docs, the image will automatically be saved into the baselinefolder.
protractor-image-comparison provides:
checkScreen
and checkElement
.saveScreen
and saveElement
for saving images.saveFullPageScreens
and a comparison method checkFullPageScreen
for saving and comparing 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.
See conventions.md.
See CONTRIBUTING.md.
It could be that the error Width and height cannot be negative
is thrown. 9 out of 10 times this is related to creating an image of an element that is not in the view. Please be sure you always make sure the element in is in the view before you try to make an image of the element.
When using Chrome and using the chromeOptions.args:['--disable-gpu']
it could be possible that the images can't be compared in the correct way. If you remove this argument all will work again. See here
index.js
based on PixDiff./lib/resemble.js
node-resemble + ResembleJSFAQs
npm-module to compare images with protractor
The npm package protractor-image-comparison receives a total of 4,959 weekly downloads. As such, protractor-image-comparison popularity was classified as popular.
We found that protractor-image-comparison demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.