提交脚本

This commit is contained in:
halliday 2023-11-25 17:43:16 +08:00
parent 2d851be664
commit 60ca0d15e7
1 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ ${driver} Firefox # 浏览器类型
CheckLastLoginIP CheckLastLoginIP
#打开浏览器并等待黑方页面加载完成 #打开浏览器并等待黑方页面加载完成
Open Browser ${unbackup} ${driver} Open Browser ${unbackup} ${driver}
Wait Until Element Is Visible id=slogan 10s Wait Until Element Is Visible id=slogan 10s 黑方打开失败
#输入用户名 #输入用户名
Set Focus To Element id=userName Set Focus To Element id=userName
Input Text id=userName ${username} Input Text id=userName ${username}
@ -23,7 +23,7 @@ CheckLastLoginIP
#点击登录 #点击登录
Set Focus To Element id=login_btn Set Focus To Element id=login_btn
Click Element id=login_btn Click Element id=login_btn
Wait Until Element Is Not Visible id=login_btn 30s Wait Until Element Is Not Visible id=login_btn 30s 黑方登录失败
#点击右上角的登录记录 #点击右上角的登录记录
Set Focus To Element xpath=//a[text()="登录记录"] Set Focus To Element xpath=//a[text()="登录记录"]
Click Element xpath=//a[text()="登录记录"] Click Element xpath=//a[text()="登录记录"]
@ -31,4 +31,4 @@ CheckLastLoginIP
Element Should Be Visible xpath=//span[text()='上次登录时间'] Element Should Be Visible xpath=//span[text()='上次登录时间']
Element Should Be Visible xpath=//span[text()='登录状态'] Element Should Be Visible xpath=//span[text()='登录状态']
#取表格中的第一个IP地址做比较 #取表格中的第一个IP地址做比较
Element Text Should Be xpath=(//td[@data-field='ipAddr'])[1]/div[text()] ${local_ip} Element Text Should Be xpath=(//td[@data-field='ipAddr'])[1]/div[text()] ${local_ip} 检查失败最近登录的IP不是${local_ip}