1.新增LADAPServer测试用例 2.修改Settings 和Admin关键字
This commit is contained in:
@@ -22,7 +22,7 @@ AdminOpenPages
|
||||
... AND click element id=${Three-levelMenu}
|
||||
run keyword if "${Targeting}"=="xpath" run keywords sleep 1
|
||||
... AND click element ${Targeting}=${Three-levelMenu}
|
||||
sleep 1
|
||||
sleep 1
|
||||
|
||||
UserCreatePage
|
||||
[Arguments] ${name} ${username} ${accPasswd} ${Required_Password_Change} ${day} ${accEnable} ${role}
|
||||
@@ -61,7 +61,7 @@ UserEdit
|
||||
click element id=userEdit
|
||||
Sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[3]/div/div/input ${password}
|
||||
sleep 1
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[4]/div/div/input ${password}
|
||||
Sleep 1
|
||||
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
|
||||
@@ -242,7 +242,122 @@ LoginLogsSearch
|
||||
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/i
|
||||
sleep 2
|
||||
|
||||
|
||||
CreateLDAPServer
|
||||
[Arguments] ${list} ${Enbale}=close ${ADCAuthentication}=close ${NoOKButton}=1
|
||||
[Documentation]
|
||||
... ${Name}:LDAP服务器名称 ${Host}:主机地址 ${Port}:端口号 ${UserName} :用户名 ${UserMapper-prefix}:用户映射左匹配 ${UserMapper-suffix}:用户映射器右匹配
|
||||
... ${Password}:密码 ${ConnectionTimeout}:链接超时时间 ${Enbale};是否生效默认为关闭(open开启) ${ADCAuthentication}:ADC认证默认关闭(open开启) ${NoOKButton}=1不点击OK按钮
|
||||
AdminOpenPages sidebarsystem_LadpServer sidebarsystem_LadpServer
|
||||
click element id=ldapAdd
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[1]/div/div[1]/input ${list}[0]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[2]/div/div[1]/input ${list}[1]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[3]/div/div/input ${list}[2]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[4]/div/div[1]/input ${list}[3]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[5]/div/div[1]/input ${list}[4]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[5]/div/div[2]/input ${list}[5]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[6]/div/div/input ${list}[6]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[8]/div/div/div/input ${list}[7]
|
||||
sleep 1
|
||||
run keyword if "${Enbale}"!= "close" run keywords sleep 1
|
||||
... AND click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[7]/div/div/span
|
||||
... AND sleep 1
|
||||
... ELSE log 不开启Enable按钮
|
||||
run keyword if "${ADCAuthentication}"!= "close" run keywords sleep 1
|
||||
... AND click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[9]/div/div/span
|
||||
... AND sleep 1
|
||||
... ELSE log 不开启ADCAuthentication按钮
|
||||
click element id=ldapTestConnection
|
||||
Wait Until Element Is Enabled xpath=/html/body/div[last()]/p 20
|
||||
run keyword if "${NoOKButton}"== "1" run keywords sleep 1
|
||||
... AND click element id=ldapAddSuccess
|
||||
sleep 2
|
||||
|
||||
EditLDAPServer
|
||||
[Arguments] ${list} ${Enbale}=close ${ADCAuthentication}=close
|
||||
[Documentation]
|
||||
... ${Name}:LDAP服务器名称 ${Host}:主机地址 ${Port}:端口号 ${UserName} :用户名 ${UserMapper-prefix}:用户映射左匹配 ${UserMapper-suffix}:用户映射器右匹配
|
||||
... ${Password}:密码 ${ConnectionTimeout}:链接超时时间 ${Enbale};是否生效默认为关闭(open开启) ${ADCAuthentication}:ADC认证默认关闭(open开启)
|
||||
sleep 2
|
||||
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
|
||||
sleep 1
|
||||
click element id=ldapEdit
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[4]/div/div[1]/input ${list}[0]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[5]/div/div[1]/input ${list}[1]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[6]/div/div/input ${list}[2]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[7]/div/div[1]/input ${list}[3]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[8]/div/div[1]/input ${list}[4]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[8]/div/div[2]/input ${list}[5]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[9]/div/div/input ${list}[6]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[11]/div/div/div/input ${list}[7]
|
||||
sleep 1
|
||||
run keyword if "${Enbale}"!= "close" run keywords sleep 1
|
||||
... AND click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[10]/div/div/span
|
||||
... AND sleep 1
|
||||
... ELSE log 不开启Enable按钮
|
||||
run keyword if "${ADCAuthentication}"!= "close" run keywords sleep 1
|
||||
... AND click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[12]/div/div/span
|
||||
... AND sleep 1
|
||||
... ELSE log 不开启ADCAuthentication按钮
|
||||
click element id=ldapTestConnection
|
||||
Wait Until Element Is Enabled xpath=/html/body/div[last()]/p 20
|
||||
click element id=ldapAddSuccess
|
||||
sleep 2
|
||||
|
||||
DeleteLDAPServer
|
||||
sleep 1
|
||||
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
|
||||
sleep 1
|
||||
click element id=ldapDel
|
||||
sleep 2
|
||||
click element xpath=/html/body/div/div/div[3]/button[2]
|
||||
Wait Until Element Is Enabled xpath=/html/body/div[last()]/p 20
|
||||
|
||||
LDAPServerSearch
|
||||
[Arguments] ${value} ${search}
|
||||
Wait Until Element Is Enabled id=ldapAdd 20
|
||||
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/div/div[2]/div/div/div/input
|
||||
sleep 1
|
||||
run keyword if "${search}" == "id" run keywords sleep 1
|
||||
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
||||
run keyword if "${search}" == "name" run keywords sleep 1
|
||||
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[3]
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/div/div[2]/div/div/div[3]/div/input ${value}
|
||||
sleep 2
|
||||
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/i
|
||||
sleep 2
|
||||
|
||||
LDAPVerificationADC
|
||||
[Arguments] ${name} ${type}
|
||||
[Documentation] 验证name的ADC按钮是否开启,同一个服务ADC只能开启一个
|
||||
... ${name}:要查询的LDAPServer的名称
|
||||
... ${type}:判断开启和关闭(close / open)
|
||||
AdminOpenPages sidebarsystem_LadpServer sidebarsystem_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 1
|
||||
run keyword if "${text}" != "el-switch" and "${type}"=="close" run keywords sleep 1
|
||||
... AND click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[9]/div/div/span/div
|
||||
run keyword if "${text}" != "el-switch is-checked" and "${type}"=="open" run keywords sleep 1
|
||||
... AND click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[9]/div/div/span/div
|
||||
sleep 1
|
||||
|
||||
Login
|
||||
[Arguments] ${UserName} ${Password}
|
||||
Mouse Hover xpath=//*[@id="app"]/div/div[1]/div[2]/div/span/div/span
|
||||
@@ -358,5 +473,10 @@ Assertion
|
||||
${text} Get text xpath=${assertxpath}
|
||||
Should Be Equal As Strings ${text} ${asserttext}
|
||||
|
||||
Assertion-ElementAttributes
|
||||
[Arguments] ${assertxpath} ${asserttext} ${Element}
|
||||
${text} Get Element Attribute xpath=${assertxpath} ${Element}
|
||||
Should Be Equal As Strings ${text} ${asserttext}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user