From 0b5df32c688ae1030f2e90e7a4bd99bc81997f04 Mon Sep 17 00:00:00 2001 From: wanshan Date: Fri, 21 Nov 2025 08:43:04 +0800 Subject: [PATCH] * [task#152439,doing,0.2h] add ui test for user module login --- module/user/test/ui/page/login.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/module/user/test/ui/page/login.php b/module/user/test/ui/page/login.php index 370192d911..76c033a0d9 100644 --- a/module/user/test/ui/page/login.php +++ b/module/user/test/ui/page/login.php @@ -6,10 +6,19 @@ class loginPage extends page parent::__construct($webdriver); $this->xpath = array( - 'avatar' => '//*[@id="userMenu-toggle"]/div/div', - 'account' => "//*[@id='account']", - 'password' => "//*[@id='password']", - 'submit' => "//*[@id='submit']", + // 页面与表单容器 + 'main' => "//*[@id='main']", + 'loginForm' => "//*[@id='loginForm']", + 'avatar' => '//*[@id="userMenu-toggle"]/div/div', + + // 表单元素 + 'account' => "//*[@id='account']", + 'password' => "//*[@id='password']", + 'submit' => "//*[@id='submit']", + + // 其他提示与链接 + 'loginExpired' => "//*[contains(@class,'loginExpired')]", + 'resetPassword' => "//*[@class='resetPassword']", ); $this->dom->xpath = array_merge($this->dom->xpath, $this->xpath);