browser-diff
Quickly assert visual differences between browsers.
Parameters
options
Object:browser-diff
optionsoptions.server
String: Selenium WebDriver URLoptions.url
String: URL to testoptions.drivers[]
Object: Selenium WebDriverwithCapabilities
options
Example using BrowserStack's WebDriver
var browserDiff = ; ;
{ "differences": 91486, "imagePath": "/diff-4dcb9f2f-388b-48dc-be41-7bd49c621669.png"}
This could easily be adopted to your own Selenium WebDriver server.
Diff image example:
browser-diff
in tests
Using // Fail if differences exceed an arbitrary value of 10000if resultdifferences > 10000 test;
Notes
When you're done with the diff
image, you should delete it to avoid clutter.
var browserDiff = ; ;