From 7cef39939ec06cd345137c75d6ec4cdb7ea24c4b Mon Sep 17 00:00:00 2001 From: luxuyang Date: Mon, 26 Aug 2024 13:58:30 +0800 Subject: [PATCH] +[task#126441] Add instanceView UItest function. --- module/instance/test/lib/instance.ui.class.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 module/instance/test/lib/instance.ui.class.php diff --git a/module/instance/test/lib/instance.ui.class.php b/module/instance/test/lib/instance.ui.class.php new file mode 100644 index 0000000000..a362862d06 --- /dev/null +++ b/module/instance/test/lib/instance.ui.class.php @@ -0,0 +1,15 @@ +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); + } +}