1.新增Login RestrictionsCase 测试用例 2.修改关键字 3.新增Audit Logs测试用例 4.新增字符串分割方法
This commit is contained in:
@@ -4,6 +4,7 @@ Resource ../Menu.robot
|
||||
Library Collections
|
||||
Library ../../../04-CustomLibrary/Custometest/StringManipulation.py
|
||||
Resource ../../../03-Variable/bifangapivariable.txt
|
||||
Library DatabaseLibrary
|
||||
|
||||
*** Keywords ***
|
||||
AdminOpenPages
|
||||
@@ -357,6 +358,93 @@ LDAPVerificationADC
|
||||
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
|
||||
|
||||
RestrictionsButton
|
||||
[Arguments] ${type}
|
||||
sleep 1
|
||||
${status1} Get Element Attribute xpath=//*[@id="policy_Manipulation2"]/div/div[2]/div/div/form/div[1]/div/div class
|
||||
${status2} Set Variable If "${status1}"=="el-switch" close open
|
||||
run keyword if "${status2}" != "${type}" run keywords sleep 1
|
||||
... AND click element xpath=//*[@id="policy_Manipulation2"]/div/div[2]/div/div/form/div[1]/div/div/span
|
||||
... ELSE log 不需要改变
|
||||
sleep 2
|
||||
click element id=wanAdd_ok
|
||||
sleep 2
|
||||
|
||||
AddAuthorizedSourceIP
|
||||
[Arguments] ${IP}
|
||||
[Documentation] 增加IP
|
||||
sleep 1
|
||||
click element id=temporary_form
|
||||
sleep 1
|
||||
input text xpath=//*[@id="policy_Manipulation2"]/div/div[2]/div/div/form/div[2]/div/div[1]/div[2]/div[1]/div/div[last()]/div/div[1]/div[1]/div/div[2]/div/input ${IP}
|
||||
sleep 1
|
||||
click element id=wanAdd_ok
|
||||
sleep 2
|
||||
|
||||
LoginRestrictions-SearchIP
|
||||
[Arguments] ${IP}
|
||||
sleep 1
|
||||
input text id=object_ip_search ${IP}
|
||||
sleep 1
|
||||
press keys id=object_ip_search ENTER
|
||||
sleep 1
|
||||
|
||||
LoginRestrictions-DeleteIP
|
||||
sleep 2
|
||||
${text} Get Element Attribute xpath=/html/body/div/div/div[3]/div[2]/div/div[1]/div/div[2]/div/div/form/div[2]/div/div[1]/div[2]/div[1]/div/div[last()]/div/div/div[2]/i[2] id
|
||||
click element id=${text}
|
||||
sleep 2
|
||||
click element id=wanAdd_ok
|
||||
sleep 2
|
||||
|
||||
LoginRestrictions-LastIPNumber
|
||||
[Documentation] 返回最后一个IP的位数
|
||||
${a} Set Variable ${7}
|
||||
sleep 1
|
||||
Execute Javascript window.scrollTo(0, document.body.scrollHeight)
|
||||
${text} Get Element Attribute xpath=/html/body/div/div/div[3]/div[2]/div/div[1]/div/div[2]/div/div/form/div[2]/div/div[1]/div[2]/div[1]/div/div[last()]/div/div/div[2]/i[2] id
|
||||
sleep 1
|
||||
${Number}= StringSegmentation_2 ${text} ${a}
|
||||
[Return] ${Number}
|
||||
|
||||
EditMaximumLoginAttemepts
|
||||
[Arguments] ${Number}
|
||||
[Documentation] 修改最多错误次数
|
||||
sleep 1
|
||||
input text xpath=//*[@id="policy_Manipulation2"]/div/div[2]/div/div/form/div[3]/div/div[1]/input ${Number}
|
||||
sleep 1
|
||||
click element id=wanAdd_ok
|
||||
sleep 2
|
||||
|
||||
EditLockTime
|
||||
[Arguments] ${Time}
|
||||
[Documentation] 修改等待时间
|
||||
sleep 1
|
||||
input text xpath=//*[@id="policy_Manipulation2"]/div/div[2]/div/div/form/div[4]/div/div[1]/input ${Time}
|
||||
sleep 1
|
||||
click element id=wanAdd_ok
|
||||
sleep 2
|
||||
|
||||
|
||||
LoginRestrictionsObtainSQLIP
|
||||
[Documentation] 获取数据库白名单并返回
|
||||
sleep 1
|
||||
Connect To Database Using Custom Params pymysql ${mysqlHost}
|
||||
${text1} query SELECT login_addr_whitelist FROM login_restrictions_config
|
||||
${text1} Set Variable ${text1[0][0]}
|
||||
Disconnect From Database
|
||||
log ${text1}
|
||||
[Return] ${text1}
|
||||
|
||||
UpdataLoginRestrictionsSQLIP
|
||||
[Arguments] ${Whitelist}
|
||||
[Documentation] 恢复白名单数据库
|
||||
sleep 1
|
||||
Connect To Database Using Custom Params pymysql ${mysqlHost}
|
||||
${return} Execute Sql String UPDATE login_restrictions_config SET login_addr_whitelist='${Whitelist}' WHERE id=1
|
||||
Disconnect From Database
|
||||
|
||||
|
||||
Login
|
||||
[Arguments] ${UserName} ${Password}
|
||||
@@ -469,7 +557,7 @@ AuditLogs-PagingDisplay
|
||||
Should Be Equal As Strings ${text} ${Page}
|
||||
|
||||
Assertion
|
||||
[Arguments] ${assertxpath} ${asserttext}
|
||||
[Arguments] ${assertxpath} ${asserttext}
|
||||
${text} Get text xpath=${assertxpath}
|
||||
Should Be Equal As Strings ${text} ${asserttext}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ CreatePage
|
||||
[Arguments] ${server} ${port} ${username} ${account} ${password}
|
||||
Menu administartion Mail Server
|
||||
sleep 3
|
||||
Mail.Create-Server ${server}
|
||||
Mail.Create -Server ${server}
|
||||
Mail.Create-Port ${port}
|
||||
Mail.Create-Username ${username}
|
||||
Mail.Create-Account ${account}
|
||||
|
||||
Reference in New Issue
Block a user