由于页面调整,维护自动化代码 原Administrator模块

This commit is contained in:
byb11
2021-07-09 15:44:26 +08:00
parent 825f503c12
commit 802a794234
8 changed files with 200 additions and 319 deletions

View File

@@ -7,53 +7,53 @@ Resource ../../../03-Variable/bifangapivariable.txt
Library DatabaseLibrary
*** Keywords ***
AdminOpenPages
[Arguments] ${SecondaryMenu} ${Three-levelMenu} ${Targeting}=null ${Amenu}=null
System
[Arguments] ${SecondaryMenu}
[Documentation]
... ${SecondaryMenu}:二级菜单
... ${Three-levelMenu}:三级菜单
... ${Targeting} :三级菜单 定位方式 默认不输入为id
run keyword if "${Amenu}"=="null" run keywords sleep ${sleep_min}
... AND click element id=Administration
... ELSE click element id=${Amenu}
click element id=VSidebar1_Home1_App0_anonymousComponent-1_System
sleep ${sleep_min}
click element xpath=${SecondaryMenu}
click element id=${SecondaryMenu}
sleep ${sleep_min}
run keyword if "${Targeting}"=="null" run keywords sleep ${sleep_min}
... AND click element id=${Three-levelMenu}
run keyword if "${Targeting}"=="xpath" run keywords sleep ${sleep_min}
... AND click element ${Targeting}=${Three-levelMenu}
sleep ${sleep_min}
UserCreatePage
[Arguments] ${name} ${username} ${accPasswd} ${Required_Password_Change} ${day} ${accEnable} ${role}
Menu administration Accounts
[Arguments] ${name} ${username} ${accPasswd} ${Required_Password_Change} ${day} ${accEnable} ${Language} ${page} ${role}
System VSidebar1_Home1_App0_anonymousComponent-1_system_accounts/system_UserManagement
Wait Until Element Is Enabled id=userAdd 10
Click element id=userAdd
sleep ${sleep}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[1]/div/div[1]/input ${name}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[1]/label[contains(text(), "Name")]/following-sibling::div/div/input ${name}
sleep ${sleep_min}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[2]/div/div[1]/input ${username}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[2]/div/div[1]/input ${username}
sleep ${sleep_min}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[3]/div/div/input ${accPasswd}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[3]/div/div/input ${accPasswd}
sleep ${sleep_min}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[4]/div/div/input ${accPasswd}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[4]/div/div/input ${accPasswd}
sleep ${sleep_min}
run keyword if "${accEnable}"=="close" run keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[6]/div/div
run keyword if "${accEnable}"=="close" run keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[6]/div/div
... AND sleep ${sleep_min}
... ELSE log 不操作
sleep ${sleep_min}
run keyword if "${Required_Password_Change}"=="open" Run Keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[5]/div/div
run keyword if "${Required_Password_Change}"=="open" Run Keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[5]/div/div
... AND sleep ${sleep_min}
... AND input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[6]/div/div/input ${day}
... ELSE log 不开启密码过期验证
Click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[last()]/div/div/div/span/span/i
... AND input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[6]/div/div/input ${day}
... ELSE log 不开启密码过期验证
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[7]/div/div/div/span/span/i
sleep ${sleep_min}
click element xpath=/html/body/div[2]/div[1]/div[1]/ul/li/span[contains(text(), "${Language}")]
sleep ${sleep_min}
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[8]/div/div/div/span/span/i
sleep ${sleep_min}
click element xpath=/html/body/div[3]/div[1]/div[1]/ul/li/span[contains(text(),"${page}")]
sleep ${sleep_min}
Click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[10]/div/div/div[1]/span/span/i
sleep ${sleep_min}
Execute Javascript window.scrollTo(0, document.body.scrollHeight)
sleep ${sleep_min}
click element //span[.="${role}"]
sleep ${sleep_min}
click button xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1]
click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[2]/button[1]
Wait Until Element Is Enabled id=userAdd ${sleep_Wait}
UserCreatePageErrorVerification
@@ -62,21 +62,21 @@ UserCreatePageErrorVerification
Wait Until Element Is Enabled id=userAdd 10
Click element id=userAdd
sleep ${sleep}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[1]/div/div[1]/input ${name}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[2]/div/div[1]/input ${name}
sleep ${sleep_min}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[2]/div/div[1]/input ${username}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[3]/div/div/input ${username}
sleep ${sleep_min}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[3]/div/div/input ${accPasswd}
sleep ${sleep_min}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[4]/div/div/input ${accPasswd}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[4]/div/div/input ${accPasswd}
sleep ${sleep_min}
run keyword if "${accEnable}"=="close" run keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[6]/div/div
run keyword if "${accEnable}"=="close" run keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[6]/div/div
... AND sleep ${sleep_min}
... ELSE log 不操作
sleep ${sleep_min}
run keyword if "${Required_Password_Change}"=="open" Run Keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[5]/div/div
run keyword if "${Required_Password_Change}"=="open" Run Keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[5]/div/div
... AND sleep ${sleep_min}
... AND input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[6]/div/div/input ${day}
... AND input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[6]/div/div/input ${day}
... ELSE log 不开启密码过期验证
Click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[last()]/div/div/div/span/span/i
sleep ${sleep_min}
@@ -84,7 +84,7 @@ UserCreatePageErrorVerification
sleep ${sleep_min}
click element //span[.="${role}"]
sleep ${sleep_min}
click button xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1]
click button xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[2]/button[1]
sleep ${sleep}
UserEdit
@@ -92,30 +92,30 @@ UserEdit
sleep ${sleep}
click element id=userEdit
sleep ${sleep_min}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[3]/div/div/input ${password}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[3]/div/div/input ${password}
sleep ${sleep_min}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[4]/div/div/input ${password}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[4]/div/div/input ${password}
sleep ${sleep_min}
run keyword if "${enable}"=="close" run keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[6]/div/div
run keyword if "${enable}"=="close" run keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[6]/div/div
... AND sleep ${sleep_min}
... ELSE log 不操作
sleep ${sleep_min}
click button xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1]
click button xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[2]/button[1]
sleep ${sleep}
UserSearchName
[Arguments] ${name} ${type}
sleep ${sleep}
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div[1]/span/div/div/div[2]/div/div/div[1]/input
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/div/div[2]/div/div/div[1]/input
sleep ${sleep}
run keyword if "${type}"=="Name" run keywords click element xpath=/html/body/div/div[1]/div[1]/ul/li[3]
... AND sleep ${sleep_min}
run keyword if "${type}"=="UserName" run keywords click element xpath=/html/body/div/div[1]/div[1]/ul/li[2]
... AND sleep ${sleep_min}
sleep ${sleep}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${name}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${name}
sleep ${sleep}
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div[1]/span/div/i
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/i
sleep ${sleep}
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
sleep ${sleep}
@@ -127,16 +127,14 @@ CreateRoles
... ${description}:备注
... ${list}:权限定位列表
sleep ${sleep_min}
Click element id=Administration
Click element id=VSidebar1_Home1_App0_anonymousComponent-1_System
sleep ${sleep_min}
Click element xpath=//*[@id="Administration"]/ul/li[1]
sleep ${sleep_min}
Click element id=profilesTabs_Profile_Insert
Click element id=VSidebar1_Home1_App0_anonymousComponent-1_system_accounts/roles
sleep ${sleep_min}
Click element id=app_create
sleep ${sleep}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[1]/div/div[1]/input ${name}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[2]/div/div/input ${description}
input text xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[1]/div/div[1]/input ${name}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[2]/div/div/input ${description}
sleep ${sleep_min}
FOR ${i} IN @{list}
log ${i}
@@ -151,12 +149,12 @@ EditRoles
[Arguments] ${name}=null ${description}=null ${Authority}=null ${Authorityxpath}=null
sleep ${sleep_min}
click element id=appEdit
Wait Until Element Is Enabled xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[1] ${sleep_Wait}
Wait Until Element Is Enabled xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[1]/div/div[1]/input ${sleep_Wait}
run keyword if "${name}" != "null" run keywords sleep ${sleep_min}
... AND input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[1]/div/div[1]/input ${name}
... AND input text xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[1]/div/div[1]/input ${name}
... ELSE log name不修改
run keyword if "${description}" != "null" run keywords sleep ${sleep_min}
... AND input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[2]/div/div/input ${description}
... AND input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[2]/div/div/input ${description}
... ELSE log description不修改
run keyword if "${Authority}" != "null" run keywords sleep ${sleep_min}
... AND click element xpath=${Authorityxpath}
@@ -171,13 +169,13 @@ RolesVerification
... ${rolexpath}:权限在侧滑框的定位
... ${role} : 权限 Enable、ReadOnly、Disable
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[3]/div/div/span/span
Wait Until Element Is Enabled xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div[5]/div ${sleep_Wait}
Wait Until Element Is Enabled xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[5]/div/p ${sleep_Wait}
${text} Get Element Attribute xpath=${rolexpath} class
${role} Set Variable if "${role}" == "Enable" iconfont switch_i icon-Rolesenable
... "${role}" == "ReadOnly" iconfont switch_i icon-Rolesreadonly
... "${role}" == "Disable" iconfont switch_i icon-Rolesdisable
sleep ${sleep_min}
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div[5]/div/div[2]/div/button
click element id=permission_cancel
sleep ${sleep_min}
Should Be Equal As Strings ${text} ${role}
@@ -186,13 +184,13 @@ RoleSearch
[Documentation] Roles页面搜索功能
... ${name}:搜索条件name
sleep ${sleep_min}
Click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div[1]/span/div/div/div[2]/div/div/div[1]/input
Click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/div/div[2]/div/div/div[1]/input
sleep ${sleep_min}
Click element xpath=/html/body/div/div[1]/div[1]/ul/li[2]
Click element xpath=/html/body/div[2]/div[1]/div[1]/ul/li[2]
sleep ${sleep_min}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${name}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${name}
sleep ${sleep_min}
Click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div[1]/span/div/i
Click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/i
sleep ${sleep}
RolesDelete
@@ -279,7 +277,7 @@ CreateLDAPServer
[Documentation]
... ${Name}:LDAP服务器名称 ${Host}:主机地址 ${Port}:端口号 ${UserName} :用户名 ${UserMapper-prefix}:用户映射左匹配 ${UserMapper-suffix}:用户映射器右匹配
... ${Password}:密码 ${ConnectionTimeout}:链接超时时间 ${Enbale};是否生效默认为关闭open开启 ${ADCAuthentication}ADC认证默认关闭open开启 ${NoOKButton}=1不点击OK按钮
AdminOpenPages //*[@id="Administration"]/ul/li[5] //*[@id="Administration"]/ul/li[5] xpath
System VSidebar1_Home1_App0_anonymousComponent-1_system_LadpServer
click element id=ldapAdd
sleep ${sleep_min}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[1]/div/div[1]/input ${list}[0]
@@ -380,7 +378,7 @@ LDAPVerificationADC
[Documentation] 验证name的ADC按钮是否开启同一个服务ADC只能开启一个
... ${name}要查询的LDAPServer的名称
... ${type}:判断开启和关闭close / open
AdminOpenPages //*[@id="Administration"]/ul/li[5] //*[@id="Administration"]/ul/li[5] xpath
System VSidebar1_Home1_App0_anonymousComponent-1_system_LadpServer
LDAPServerSearch ${name} name
${text} Get Element Attribute xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[9]/div/div/span/div class
sleep ${sleep_min}
@@ -459,11 +457,9 @@ EditLockTime
OpenMyAccountPage
[Documentation] 打开MyAccount侧滑框
sleep ${sleep_min}
click element id=user_avator
sleep ${sleep_min}
Mouse Hover xpath=//*[@id="app"]/div/div[1]/div[2]/div/span/div/span
Wait Until Element Is Enabled id=editInfo ${sleep_Wait}
Mouse Hover xpath=//*[@id="app"]/div/div[1]/div[3]/div/span[2]
sleep ${sleep}
click element id=editInfo
sleep ${sleep}
@@ -474,17 +470,17 @@ EditMyAccount
sleep ${sleep_min}
input text id=undefined1 ${name}
sleep ${sleep_min}
input text xpath=/html/body/div/div/div[1]/div/div/div[1]/div/div/div[1]/div[2]/form/div[3]/div/div/input ${password}
input text xpath=/html/body/div[3]/div/div[1]/div/div/div[1]/div/div/div[1]/div[2]/form/div[3]/div/div/input ${password}
sleep ${sleep_min}
input text xpath=/html/body/div/div/div[1]/div/div/div[1]/div/div/div[1]/div[2]/form/div[4]/div/div/input ${ConfirmPassword}
input text xpath=/html/body/div[3]/div/div[1]/div/div/div[1]/div/div/div[1]/div[2]/form/div[4]/div/div/input ${ConfirmPassword}
sleep ${sleep_min}
${status} Get Element Attribute xpath=/html/body/div/div/div[1]/div/div/div[1]/div/div/div[1]/div[2]/form/div[5]/div/div class
${status} Get Element Attribute xpath=/html/body/div[3]/div/div[1]/div/div/div[1]/div/div/div[1]/div[2]/form/div[5]/div/div class
run keyword if "${RequiredPasswordChange}"=="open" and "${status}"=="el-switch" run keywords sleep ${sleep_min}
... AND click element xpath=/html/body/div/div/div[1]/div/div/div[1]/div/div/div[1]/div[2]/form/div[5]/div/div/span
... AND click element xpath=/html/body/div[3]/div/div[1]/div/div/div[1]/div/div/div[1]/div[2]/form/div[5]/div/div/span
... AND sleep ${sleep_min}
... AND input text xpath=/html/body/div/div/div[1]/div/div/div[1]/div/div/div[1]/div[2]/form/div[6]/div/div/input ${Day}
... AND input text xpath=/html/body/div[3]/div/div[1]/div/div/div[1]/div/div/div[1]/div[2]/form/div[6]/div/div/input ${Day}
run keyword if "${RequiredPasswordChange}"=="close" and "${status}"=="el-switch is-checked" run keywords sleep ${sleep_min}
... AND click element xpath=/html/body/div/div/div[1]/div/div/div[1]/div/div/div[1]/div[2]/form/div[5]/div/div/span
... AND click element xpath=/html/body/div[3]/div/div[1]/div/div/div[1]/div/div/div[1]/div[2]/form/div[9]/div[3]/div/div[1]/span
... ELSE log 不修改密码提醒按钮
sleep ${sleep_min}
click element id=userOk
@@ -514,7 +510,7 @@ EditMailServer
[Arguments] ${server} ${port} ${NeedAuthentication} ${name} ${e-mail} ${password} ${SSL}
[Documentation]
...
AdminOpenPages //*[@id="Administration"]/ul/li[4] //*[@id="Administration"]/ul/li[4] xpath
System VSidebar1_Home1_App0_anonymousComponent-1_system_MailServer
sleep ${sleep_min}
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[1]/div/div/input ${server}
sleep ${sleep_min}
@@ -543,9 +539,9 @@ EditMailServer
Login
[Arguments] ${UserName} ${Password}
Mouse Hover xpath=//*[@id="app"]/div/div[1]/div[2]/div/span/div/span
Mouse Hover xpath=//*[@id="app"]/div/div[1]/div[3]/div/span[2]
sleep ${sleep_min}
click element xpath=//div[@class='SignOut']
click element id=SignOut
sleep ${sleep}
input text xpath=//*[@id="app"]/div/div[2]/div/div[2]/div/input ${UserName}
sleep ${sleep_min}
@@ -585,73 +581,7 @@ AdminTurnPage
Should Not Be Equal ${text1} ${text2}
Should Not Be Equal ${text3} ${text2}
Should Not Be Equal ${text3} ${text4}
Should Not Be Equal ${text1} ${text5}
AdministrationPagingDisplay
[Arguments] ${Number}
[Documentation]
... ${Number}: 设置页面显示数据条数 20、5、30、50、100
... ${last} 次关键字 当最后一页定位和其他页面不同时传入非null的值
... ${lastxpath} 当最后一页定位和其他页面不同时传入最后一页的xpath 定位
Mouse Over xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div/span/span/div/i
sleep ${sleep_min}
run keyword if "${Number}"=="30" run keywords sleep ${sleep_min}
... AND Click element xpath=//*[@id="page-size"]/div/label[2]
... ELSE IF "${Number}"=="50" run keywords sleep ${sleep_min}
... AND Click element xpath=//*[@id="page-size"]/div/label[3]
... ELSE IF "${Number}"=="100" run keywords sleep ${sleep_min}
... AND Click element xpath=//*[@id="page-size"]/div/label[4]
... ELSE Clear Element Text xpath=/html/body/div[last()]/div[1]/div[2]/input
... AND Input Text xpath=/html/body/div[last()]/div[1]/div[2]/input ${Number}
sleep ${sleep_min}
Click element xpath=/html/body/div[last()]/div[1]/div[2]/button
sleep ${sleep}
${text} Get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div[4]/div/span[1]
sleep ${sleep_min}
${a} Set Variable ${6}
${Quantity} StringSegmentation ${text} ${a}
sleep ${sleep_min}
${quyu} Evaluate ${Quantity}%${Number}
${qumo} Evaluate ${Quantity}/${Number}
${quzheng} Evaluate int(${qumo})
${b} Set Variable ${1}
${Page1} Evaluate ${quzheng}+${b}
${Page} Set Variable if "${quyu}" != "0" ${Page1} ${quzheng}
sleep ${sleep_min}
${text} Get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div/div/ul/li[last()]
Should Be Equal As Strings ${text} ${Page}
AuditLogs-PagingDisplay
[Arguments] ${Number}
[Documentation]
... ${Number}: 设置页面显示数据条数 20、5、30、50、100
Mouse Over xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div/span/span/div/i
sleep ${sleep_min}
run keyword if "${Number}"=="30" run keywords sleep ${sleep_min}
... AND Click element xpath=//*[@id="page-size"]/div/label[2]
... ELSE IF "${Number}"=="50" run keywords sleep ${sleep_min}
... AND Click element xpath=//*[@id="page-size"]/div/label[3]
... ELSE IF "${Number}"=="100" run keywords sleep ${sleep_min}
... AND Click element xpath=//*[@id="page-size"]/div/label[4]
... ELSE Clear Element Text xpath=/html/body/div[last()]/div[1]/div[2]/input
... AND Input Text xpath=/html/body/div[last()]/div[1]/div[2]/input ${Number}
sleep ${sleep_min}
Click element xpath=/html/body/div[last()]/div[1]/div[2]/button
sleep ${sleep}
${text} Get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[4]/div/span[1]
sleep ${sleep_min}
${a} Set Variable ${6}
${Quantity} StringSegmentation ${text} ${a}
sleep ${sleep_min}
${quyu} Evaluate ${Quantity}%${Number}
${qumo} Evaluate ${Quantity}/${Number}
${quzheng} Evaluate int(${qumo})
${b} Set Variable ${1}
${Page1} Evaluate ${quzheng}+${b}
${Page} Set Variable if "${quyu}" != "0" ${Page1} ${quzheng}
sleep ${sleep_min}
${text} Get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[4]/div/ul/li[last()]
Should Be Equal As Strings ${text} ${Page}
Should Not Be Equal ${text1} ${text5}
Assertion
[Arguments] ${assertxpath} ${asserttext}

View File

@@ -25,7 +25,7 @@ Password-prompt
${status} Run Keyword And Return Status Page Should Contain Does the password need to be changed when the password expires? #判断页面是否包含该文本
run keyword if "${status}"=="True" run keywords Password-prompt-true ${passwd} ${day} ${editpasswd}
run keyword if "${status}"=="False" log 密码未过期
Wait Until Element Is Visible id=dashboard 20
Wait Until Element Is Visible id=VSidebar1_Home1_App0_anonymousComponent-1_dashboard 20
Password-prompt-true
[Arguments] ${passwd} ${day} ${editpasswd}