+[task#126441] Add instanceView UItest function.

This commit is contained in:
luxuyang
2024-08-26 14:06:05 +08:00
committed by 陆旭阳
parent bdbffaefa0
commit 7cef39939e
@@ -0,0 +1,15 @@
<?php
use Facebook\WebDriver\WebDriverBy;
include dirname(__FILE__, 5) . '/test/lib/ui.php';
class instance extends tester
{
public function instanceView($type)
{
$this->login();
$this->initForm('space', 'browse', '', 'appIframe-devops');
$xpathNum = $this->page->webdriver->driver->findElement(WebDriverBy::xpath("(//div[text()='$type']/..)[1]"))->getAttribute('data-row');
$this->page->webdriver->driver->findElement(WebDriverBy::xpath("//div[@data-col='name' and @data-row=$xpathNum]//a[text()]"))->click();
$this->webdriver->wait(1);
}
}