Source
$overlay = $this->query('xpath://div[@class="overlay-dialogue wordbreak"]')->asOverlayDialog()->waitUntilPresent()->one();
<?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 dirname(__FILE__).'/../../include/CWebTest.php';
require_once dirname(__FILE__).'/../../include/helpers/CDataHelper.php';
/**
* @backup hosts
*
* @onBefore prepareInterfacesData
*/
class testPageHostInterfaces extends CWebTest {
const RED = 'rgba(214, 78, 78, 1)';
const GREEN = 'rgba(52, 175, 103, 1)';
const ORANGE = 'rgba(241, 165, 11, 1)';
const GREY = 'rgba(235, 235, 235, 1)';
public static function prepareInterfacesData() {
$interfaces = [
[
'type' => 1,
'main' => 1,
'useip' => 0,
'ip' => '127.1.1.1',
'dns' => '1available.zabbix.com',
'port' => '10050'
],
[
'type' => 1,
'main' => 0,
'useip' => 0,
'ip' => '127.1.1.2',
'dns' => '2available.zabbix.com',
'port' => '10051'
],
[
'type' => 2,
'main' => 1,
'useip' => 1,
'ip' => '127.0.0.98',
'dns' => 'snmpv3zabbix.com',
'port' => '163',
'details' => [
'version' => '3',
'bulk' => '1',
'securityname' => 'zabbix',
'max_repetitions' => 10
]
],
[