require_once 'vendor/autoload.php';
require_once __DIR__.'/CTest.php';
require_once __DIR__.'/web/CPage.php';
require_once __DIR__.'/helpers/CDataHelper.php';
require_once __DIR__.'/helpers/CXPathHelper.php';
require_once __DIR__.'/helpers/CImageHelper.php';
require_once __DIR__.'/../../include/classes/helpers/CMessageHelper.php';
require_once __DIR__.'/../../include/classes/routing/CUrl.php';
require_once __DIR__.'/../selenium/behaviors/CMacrosBehavior.php';
require_once __DIR__.'/../selenium/behaviors/CMessageBehavior.php';
require_once __DIR__.'/../selenium/behaviors/CPreprocessingBehavior.php';
require_once __DIR__.'/../selenium/behaviors/CTableBehavior.php';
require_once __DIR__.'/../selenium/behaviors/CTagBehavior.php';
require_once __DIR__.'/../selenium/behaviors/CWidgetBehavior.php';
class CWebTest extends CTest {
const NETWORK_THROTTLING_NONE = 'none';
const NETWORK_THROTTLING_OFFLINE = 'offline';
const NETWORK_THROTTLING_SLOW = 'slow';
const NETWORK_THROTTLING_FAST = 'fast';
const HOST_LIST_PAGE = 'zabbix.php?action=host.list';
private $capture_screenshot = true;
private $screenshot = null;
private $current_url = null;
private $browser_errors = null;
private static $shared_page = null;
private $supress_case_errors = false;
private static $supress_suite_errors = false;
protected static $screenshot_data = [];
protected function onNotSuccessfulTest($exception): void {
if ($this->browser_errors !== null && $exception instanceof Exception) {
CExceptionHelper::setMessage($exception, $exception->getMessage()."\n\n".$this->browser_errors);
if ($this->errors !== [] && $exception instanceof Exception) {
CExceptionHelper::setMessage($exception, $exception->getMessage()."\n\n".implode("\n",$this->errors));
if ($this->screenshot !== null && $exception instanceof Exception) {