Automate chrome browser render diffs for website testing
Featuring Puppeteer, headless Chrome and Python image diffing
pip install visualdiff
Create your tests calling visualdiff.compare(url), this will drive a headless Chrome session rendering the desired URL and comparing the resulting image with an expected one.
The expectation are stored by default in a visualdiff subfolder of the current calling test script.
There are several additional options you can use, we’ll see them in the examples
import visualdiff as vd assert not vd.difference('https://example.com')
It is a long time that I wanted a tool like this one, but thanks to this article from Monica Dinculescu for finally convincing me.
Thanks to Mijakogi for the outstanding work on Pyppeteer
Disable CSS animation, allow screenshot delay
If save_differences==True the diff file will contain an highlighted diff-rect
First version in Continuous Integration
Beta version, things should work
First release on PyPI.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for visualdiff-0.3.2-py2.py3-none-any.whl