use Facebook\WebDriver\Exception\TimeoutException;
require_once dirname(__FILE__).'/../include/CWebTest.php';
require_once dirname(__FILE__).'/behaviors/CTableBehavior.php';
class testPageSearch extends CWebTest {
public function getBehaviors() {
return [CTableBehavior::class];
protected $search_string = 'Test object';
protected static $widgets = [
'selector' => 'id:search_hosts_widget',
'table_selector' => "xpath://div[@id='search_hosts_widget']//table",
'column_groups' => ['Host', 'IP', 'DNS', 'Monitoring', 'Configuration'],
['text' => 'Test object Host', 'href' => 'zabbix.php?action=host.edit&hostid={id}'],
['text' => 'testdnstwo.example.com'],
['text' => 'Latest data', 'href' => 'zabbix.php?action=latest.view&hostids%5B%5D={id}&filter_set=1'],
['text' => 'Problems', 'href' => 'zabbix.php?action=problem.view&hostids%5B0%5D={id}&filter_set=1'],
['text' => 'Graphs', 'href' => 'zabbix.php?action=charts.view&filter_hostids%5B0%5D={id}&filter_set=1'],
['text' => 'Dashboards', 'href' => 'zabbix.php?action=host.dashboard.view&hostid={id}'],
['text' => 'Web', 'href' => 'zabbix.php?action=web.view&filter_hostids%5B%5D={id}&filter_set=1'],
['text' => 'Items', 'href' => 'items.php?filter_set=1&filter_hostids%5B0%5D={id}&context=host'],
['text' => 'Triggers', 'href' => 'triggers.php?filter_set=1&filter_hostids%5B0%5D={id}&context=host'],
['text' => 'Graphs', 'href' => 'graphs.php?filter_set=1&filter_hostids%5B0%5D={id}&context=host'],
['text' => 'Discovery', 'href' => 'host_discovery.php?filter_set=1&filter_hostids%5B0%5D={id}&context=host'],
['text' => 'Web', 'href' => 'httpconf.php?filter_set=1&filter_hostids%5B0%5D={id}&context=host']
'selector' => 'id:search_hostgroup_widget',
'table_selector' => "xpath://div[@id='search_hostgroup_widget']//table",
'title' => 'Host groups',
'column_groups' => ['Host group', 'Monitoring', 'Configuration'],
['text' => 'Test object Hostgroup', 'href' => 'hostgroups.php?form=update&groupid={id}&hostid=0'],
['text' => 'Latest data', 'href' => 'zabbix.php?action=latest.view&groupids%5B%5D={id}&filter_set=1'],
['text' => 'Problems', 'href' => 'zabbix.php?action=problem.view&groupids%5B0%5D={id}&filter_set=1'],
['text' => 'Web', 'href' => 'zabbix.php?action=web.view&filter_groupids%5B%5D={id}&filter_set=1'],
['text' => 'Hosts 1', 'href' => 'zabbix.php?action=host.list&filter_set=1&filter_groups%5B0%5D={id}'],
['text' => 'Templates 1', 'href' => 'templates.php?filter_set=1&filter_groups%5B0%5D={id}']
'selector' => 'id:search_templates_widget',
'table_selector' => "xpath://div[@id='search_templates_widget']//table",
'column_groups' => ['Template', 'Configuration'],
['text' => 'Test object Template', 'href' => 'templates.php?form=update&templateid={id}'],
['text' => 'Items', 'href' => 'items.php?filter_set=1&filter_hostids%5B0%5D={id}&context=template'],