A first try to build a website comparison tool based on screenshots, e.g. visual regression testing on updates.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.1 KiB

#!/usr/bin/env php
declare(ticks = 1);
pcntl_signal(SIGINT, function () {
require __DIR__ . '/vendor/autoload.php';
use Codappix\WebsiteComparison\Command\CompareCommand;
use Codappix\WebsiteComparison\Command\CreateBaseCommand;
use Facebook\WebDriver\Chrome\ChromeDriver;
use Facebook\WebDriver\Chrome\ChromeDriverService;
use Symfony\Component\Console\Application;
use Symfony\Component\EventDispatcher\EventDispatcher;
$eventDispatcher = new EventDispatcher();
$chromeDriver = (function () {
$chromeDriverService = new ChromeDriverService(
return ChromeDriver::start(null, $chromeDriverService);
$application = new Application();
// TODO: Use factory for commands, which injects event dispatcher and chrome driver?
$application->add(new CreateBaseCommand($eventDispatcher, $chromeDriver));
$application->add(new CompareCommand($eventDispatcher, $chromeDriver));