1. Go to this page and download the library: Download mvadzim/visualception library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mvadzim / visualception example snippets
class VisualCest
{
/**
* @env firefox
* @env chrome
*
* @example(url="https://time.is/ru/Kyiv", wantTo="Страница точного времени в Киеве, этот тест будет постоянно падать")
* @example(url="https://github.com/pricing", wantTo="Страница с ценами на гитхаб, этот тест будет падать редко")
* @example(url="https://time.is/uk/Kyiv", wantTo="Сторінка точного часу в Києві, цей тест буде постійно падати")
*/
public function visualTest(\AcceptanceTester $I, \Codeception\Example $example)
{
$I->wantTo('Визуальная проверка важных страниц');
$I->amOnUrl($example['url']);
$I->dontSeeVisualChangesInCurrentPage(['div#twd'], ['iframe']); // div#twd set style "visibility: hidden;" iframe set "display: none;"
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.