1、提交修改settings模块关键字和用例2、提交修改user和ip限制登录关键字
This commit is contained in:
@@ -62,7 +62,7 @@ IP-Edit
|
||||
\ sleep 1
|
||||
\ IP-search ${ip}[${i}]
|
||||
\ sleep 1
|
||||
\ Click Element //*[@id="policy_Manipulation2"]/div/div[2]/div/div/form/div[2][text()="${ip}[${i}]"] #点击修改按钮
|
||||
\ Click Element //div[text()="${ip}[${i}]"] #点击修改按钮
|
||||
\ sleep 1
|
||||
\ input text id=statusInputedit ${new_ip} #输入修改后的ip
|
||||
sleep 1
|
||||
|
||||
@@ -11,7 +11,7 @@ Menu
|
||||
${policys} create dictionary Security Policy=sidebarObjects_ProxyInterception Proxy Policy=sidebarObjects_ProxyManipulation WAN NAT=sidebarWan_nat Schedules=sidebarObjects_Schedule Tags=sidebarObjects_Tags
|
||||
${objects} create dictionary IP=sidebarObjects_ip FQDN=sidebarObjects_fqdn SubscriberID=sidebarObjects_subscriberid HTTPSignature=sidebarObjects_http_signature Key=sidebarObjects_keywords URL=sidebarObjects_url Category=sidebarObjects_fqdn_category Account=sidebarObjects_account Applications=sidebarApplication
|
||||
${log} create dictionary Security Event Logs=sidebarLog_SecurityEventLogs Proxy Event Logs=sidebarLog_ProxyEventLogs Session Records=sidebarLog_SesssionRecords Radius Logs=sidebarLog_RadiusLogs
|
||||
${administration} create dictionary Accounts=sidebarsystem_UserManagement Audit Log=sidebarsystem_PolicyConfigurationLog Login Log =sidebarsystem_LoginLog Mail Server=sidebarsystem_MailServer LDAP Server=sidebarsystem_LadpServer Login Restrictions=sidebarLogin_Restrictions
|
||||
${administration} create dictionary Accounts=sidebarsystem_accounts Audit Log=sidebarsystem_PolicyConfigurationLog Login Log =sidebarsystem_LoginLog Mail Server=sidebarsystem_MailServer LDAP Server=sidebarsystem_LadpServer Login Restrictions=sidebarLogin_Restrictions
|
||||
|
||||
# 遍历一级菜单
|
||||
FOR ${list} ${num} IN ENUMERATE @{dict}
|
||||
|
||||
@@ -13,28 +13,28 @@ CreateButton
|
||||
Create-Name
|
||||
[Arguments] ${accName}
|
||||
sleep 2
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[1]/div/div[1]/input ${accName}
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[1]/div/div[1]/input ${accName}
|
||||
|
||||
Create-Username
|
||||
[Arguments] ${accName}
|
||||
sleep 2
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[2]/div/div[1]/input ${accName}
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[2]/div/div[1]/input ${accName}
|
||||
|
||||
Create-Password
|
||||
[Arguments] ${accPasswd}
|
||||
sleep 2
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[3]/div/div/input ${accPasswd}
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[3]/div/div/input ${accPasswd}
|
||||
|
||||
Create-Enable
|
||||
[Arguments] ${accEnable}
|
||||
sleep 2
|
||||
run keyword if "${accEnable}"=="close" run keywords click element xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/div[2]/form/div[4]/div/div
|
||||
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
|
||||
... AND sleep 1
|
||||
... ELSE log 不操作
|
||||
|
||||
Create-Ok
|
||||
sleep 1
|
||||
click button xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/button[1]
|
||||
click button xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1]
|
||||
|
||||
Create-Cancel
|
||||
click button id=userAdd_cancel
|
||||
@@ -78,17 +78,17 @@ User-Edit
|
||||
Ui-User-Search-Name
|
||||
[Arguments] ${name} ${type}
|
||||
sleep 2
|
||||
Wait Until Page Contains Element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/div/div[2]/div/div/div/input 20
|
||||
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/div/div[2]/div/div/div/input
|
||||
Wait Until Page Contains Element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div/div[1]/input 20
|
||||
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div/div[1]/input
|
||||
sleep 2
|
||||
run keyword if "${type}"=="Name" run keywords click element xpath=/html/body/div/div[1]/div[1]/ul/li[3]
|
||||
... AND sleep 1
|
||||
run keyword if "${type}"=="User Name" run keywords click element xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
||||
... AND sleep 1
|
||||
sleep 2
|
||||
input text //*[@id="app"]/div/div[3]/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[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${name}
|
||||
sleep 2
|
||||
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/span/div/i
|
||||
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/i
|
||||
sleep 2
|
||||
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
|
||||
sleep 2
|
||||
|
||||
@@ -6,18 +6,21 @@ Library Collections
|
||||
|
||||
*** Keywords ***
|
||||
CreatePage
|
||||
[Arguments] ${name} ${username} ${accPasswd} ${Required_Password_Change} ${day} ${accEnable}
|
||||
Menu administartion Accounts
|
||||
[Arguments] ${name} ${username} ${accPasswd} ${Required_Password_Change} ${day} ${accEnable} ${role}
|
||||
Menu administration Accounts
|
||||
Accounts.CreateButton
|
||||
Accounts.Create-Name ${name}
|
||||
Accounts.Create-Username ${username}
|
||||
Accounts.Create-Password ${accPasswd}
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[4]/div/div[1]/input ${accPasswd}
|
||||
run keyword if "${Required_Password_Change}"=="open" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[2]/form/div[5]/div/div
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[4]/div/div/input ${accPasswd}
|
||||
run keyword if "${Required_Password_Change}"=="open" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[5]/div/div
|
||||
... AND sleep 1
|
||||
... ELSE log 不开启密码过期验证
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/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/div[1]/div[2]/form/div[6]/div/div/input ${day}
|
||||
... ELSE log 不开启密码过期验证
|
||||
Accounts.Create-Enable ${accEnable}
|
||||
Click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[8]/div/div/div/span/span/i
|
||||
sleep 1
|
||||
click element //span[.="${role}"]
|
||||
Accounts.Create-Ok
|
||||
|
||||
DeletePage
|
||||
|
||||
@@ -21,13 +21,13 @@ Clear-cache
|
||||
run keyword if "${status}"=="False" log 不用进行清除缓存
|
||||
|
||||
Password-prompt
|
||||
[Arguments] ${passwd}=123 ${day}=30
|
||||
[Arguments] ${passwd}=123 ${day}=30 ${editpasswd}=no
|
||||
${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}
|
||||
run keyword if "${status}"=="True" run keywords Password-prompt-true ${passwd} ${day} ${editpasswd}
|
||||
run keyword if "${status}"=="False" log 密码未过期
|
||||
|
||||
Password-prompt-true
|
||||
[Arguments] ${passwd} ${day}
|
||||
[Arguments] ${passwd} ${day} ${editpasswd}
|
||||
run keyword if "${editpasswd}"=="yes" run keywords sleep 1
|
||||
... AND click element xpath=/html/body/div[2]/div/div[3]/button[2]
|
||||
... AND sleep 1
|
||||
|
||||
@@ -32,16 +32,16 @@ Settings-Search
|
||||
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
||||
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
|
||||
... ELSE IF "${search}"=="Issuer" run keywords sleep 1
|
||||
... AND click xpath=/html/body/div[7]/div[1]/div[1]/ul/li[4]
|
||||
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[4]
|
||||
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
|
||||
... ELSE IF "${search}"=="Common Name" run keywords sleep 1
|
||||
... AND click xpath=/html/body/div[7]/div[1]/div[1]/ul/li[5]
|
||||
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[5]
|
||||
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
|
||||
... ELSE IF "${search}"=="Certificate Fingerprint" run keywords sleep 1
|
||||
... AND click xpath=/html/body/div[7]/div[1]/div[1]/ul/li[6]
|
||||
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[6]
|
||||
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
|
||||
... ELSE IF "${search}"=="Source Website" run keywords sleep 1
|
||||
... AND click xpath=/html/body/div[7]/div[1]/div[1]/ul/li[2]
|
||||
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[3]
|
||||
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
|
||||
sleep 1
|
||||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/i #点击搜索按钮
|
||||
@@ -232,7 +232,7 @@ VPN-Accounts-Delete
|
||||
|
||||
Create-Proxy-TCP-Options
|
||||
[Arguments] ${name} ${ip-type} ${ip-value} ${ip-type1} ${ip-value1} ${Client-ttl-value} ${Client-User-Timeout} ${Server-ttl-value} ${Server-User-Timeout} ${search}
|
||||
... ${Filter}=1 ${sni-type}=FQDN ${sni-value}=test-.com ${Enable-TCP-Passthrough}=1 ${Bypass-Duplicated-Packet}=1 ${Client-Override-MSS}=1
|
||||
... ${Filter}=1 ${Source}=yes ${Destination}=1 ${sni-type}=FQDN ${sni-value}=test-.com ${Enable-TCP-Passthrough}=1 ${Bypass-Duplicated-Packet}=1 ${Client-Override-MSS}=1
|
||||
... ${Client-MSS-value}=1000 ${Client-No-Delay}=1 ${Client-Keepalive}=1 ${Client-Probe-Number}=1 ${Client-Idle-Time}=30 ${Client-Interval}=15
|
||||
... ${Server-Override-MSS}=1 ${Server-MSS-value}=100 ${Server-No-Delay}=1 ${Server-Keepalive}=1 ${Server-Probe-Number}=1 ${Server-Idle-Time}=30 ${Server-Interval}=15
|
||||
Sleep 1
|
||||
@@ -438,7 +438,7 @@ Create-Hijack Files
|
||||
Should Be Equal As Strings ${text1} ${name} #断言
|
||||
|
||||
Create-Insert Scripts
|
||||
[Arguments] ${name} ${file} ${type} ${search}
|
||||
[Arguments] ${name} ${file} ${type} ${search} ${jstype}=Before Page Load
|
||||
Sleep 1
|
||||
click id=children6 #点击一级目录Settings
|
||||
Sleep 1
|
||||
@@ -454,7 +454,14 @@ Create-Insert Scripts
|
||||
Sleep 2
|
||||
click id=insert_select_format #点击下拉框按钮
|
||||
Sleep 1
|
||||
click ${type} #选择css
|
||||
run keyword if "${type}"=="css" run keywords sleep 1
|
||||
... AND click //span[.="${type}"] #选择css
|
||||
run keyword if "${type}"=="js" run keywords sleep 1
|
||||
... AND click //span[.="${type}"]
|
||||
... AND sleep 1
|
||||
... AND click id=insert_select_insertOn #点击下拉框
|
||||
... AND sleep 1
|
||||
... AND click //span[.="${jstype}"]
|
||||
sleep 1
|
||||
click id=insertAddOk1 #点击OK
|
||||
Sleep 1
|
||||
@@ -492,7 +499,7 @@ Create-Traffic Mirror Profiles
|
||||
Should Be Equal As Strings ${text1} ${name} #断言
|
||||
|
||||
Edit-Insert Scripts
|
||||
[Arguments] ${id-name} ${name1} ${file} ${type} ${search}
|
||||
[Arguments] ${id-name} ${name1} ${file} ${type} ${search} ${jstype}=Before Page Load
|
||||
[Documentation] 引用关键字,填入必填参数
|
||||
... 必填参数:
|
||||
... ${search}:为选择要查询的类型是ID或者Name的元素
|
||||
@@ -518,7 +525,15 @@ Edit-Insert Scripts
|
||||
sleep 1
|
||||
click id=insert_select_format #点击下拉框
|
||||
sleep 1
|
||||
click ${type} #选择文件类型
|
||||
#选择文件类型
|
||||
run keyword if "${type}"=="css" run keywords sleep 1
|
||||
... AND click //span[.="${type}"] #选择css
|
||||
run keyword if "${type}"=="js" run keywords sleep 1
|
||||
... AND click //span[.="${type}"]
|
||||
... AND sleep 1
|
||||
... AND click id=insert_select_insertOn #点击下拉框
|
||||
... AND sleep 1
|
||||
... AND click //span[.="${jstype}"]
|
||||
sleep 1
|
||||
click id=insertAddOk1 #点击ok提交
|
||||
|
||||
@@ -728,7 +743,7 @@ Create-Decryption Keyrings
|
||||
sleep 1
|
||||
${root} Set Variable ${shift}
|
||||
run keyword if "${root}"=="open" run keywords sleep 1
|
||||
... AND click xpath=//*[@id="app"]/div/div[3]/div/div/div[3]/div/div[2]/form/div[10]/div/div
|
||||
... AND click xpath=//*[@id="app"]/div/div[3]/div/div/div[3]/div/div[2]/form/div[9]/div/div
|
||||
... ELSE IF "${root}"=="close" log "go on"
|
||||
click id=keyringsadd_sub #点击OK缇交
|
||||
Sleep 2
|
||||
|
||||
Reference in New Issue
Block a user