Source
'tag.textContent = "* {text-rendering: geometricPrecision; image-rendering: pixelated} .selenium-hide {opacity: 0 !important}";'.
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
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/CTagBehavior.php';
require_once __DIR__.'/../selenium/behaviors/CTableBehavior.php';
require_once __DIR__.'/../selenium/behaviors/CWidgetBehavior.php';
define('TEST_GOOD', 0);
define('TEST_BAD', 1);
define('TEST_ERROR', 2);
/**
* Base class for Selenium tests.
*/
class CWebTest extends CTest {
// Network throttling emulation modes.
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';
// Screenshot capture on error.
private $capture_screenshot = true;
// Screenshot taken on test failure.
private $screenshot = null;
// Errors captured during the test.
protected $errors = [];
// Failed test URL.
private $current_url = null;
// Browser errors captured during test.
private $browser_errors = null;
// Shared page instance.
private static $shared_page = null;
// Enable suppressing of browser errors on test case level.