A simple tool that visits two urls and takes a screenshot of each. It then compares the two screenshots and outputs the difference.
The main reason for building this tool is that I needed to compare two versions of a website during the migration from one version of a CMS to another.
Create a JSON file with a list of urls. The file should look like this:
[
{
"name": "test1",
"base": "https://www.example.com",
"compare": "http://www.example.com",
"wait": 10 // optional
},
{
"name": "test2",
"base": "https://www.anotherexample.com",
"compare": "http://www.anotherexample.com",
"wait": 5 // optional
}
]
Simply run the following command in a prepared folder where it can create a folder called screenshots
:
npx komparator