2714 lines
156 KiB
Plaintext
2714 lines
156 KiB
Plaintext
*** Settings ***
|
||
Library Selenium2Library
|
||
Library Collections
|
||
Library ../../../04-CustomLibrary/Custometest/Common.py
|
||
Library DatabaseLibrary
|
||
Library ../../../04-CustomLibrary/Custometest/StringManipulation.py
|
||
Resource ../../../03-Variable/bifangapivariable.txt
|
||
*** Keywords ***
|
||
click
|
||
[Arguments] ${element}
|
||
Click Element ${element}
|
||
|
||
input
|
||
[Arguments] ${element} ${text}
|
||
Input Text ${element} ${text}
|
||
|
||
ui-logout
|
||
Close Browser
|
||
|
||
ui-login
|
||
Open Browser http://192.168.40.120 Chrome
|
||
input xpath=//*[@id="app"]/div/div[2]/div/div[2]/div/input lyf
|
||
input xpath=//*[@id="app"]/div/div[2]/div/div[3]/div/input 111111
|
||
click xpath=//*[@id="app"]/div/div[2]/div/div[4]/button
|
||
|
||
Settings-Search
|
||
[Arguments] ${value} ${search}
|
||
sleep ${sleep}
|
||
click 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 ${sleep_min}
|
||
#判断是使用name搜索还是id搜索
|
||
run keyword if "${search}"=="name" run keywords sleep ${sleep_min}
|
||
... 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}
|
||
... ELSE IF "${search}"=="id" run keywords sleep ${sleep_min}
|
||
... 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 ${sleep_min}
|
||
... 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}"=="CommonName" run keywords sleep ${sleep_min}
|
||
... 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}"=="CertificateFingerprint" run keywords sleep ${sleep_min}
|
||
... 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 ${sleep_min}
|
||
... 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}
|
||
... ELSE IF "${search}"=="JA3Hash" run keywords sleep ${sleep_min}
|
||
... 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}
|
||
... ELSE IF "${search}"=="GeoName" run keywords sleep ${sleep_min}
|
||
... 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}"=="CountryandRegion" run keywords sleep ${sleep_min}
|
||
... 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}
|
||
... ELSE IF "${search}"=="City" run keywords sleep ${sleep_min}
|
||
... 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}"=="ip" run keywords sleep ${sleep_min}
|
||
... 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}"=="port" run keywords sleep ${sleep_min}
|
||
... 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}
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/i #点击搜索按钮
|
||
sleep ${sleep}
|
||
|
||
CreateSNATIPPools
|
||
[Arguments] ${name} ${type} ${ip} ${j}=1
|
||
Sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
Sleep ${sleep_min}
|
||
click id=sidebarSetting_Wannat #点击wan net
|
||
sleep ${sleep_min}
|
||
click id=ip #点击SNAT-IP-Pools
|
||
sleep ${sleep_min}
|
||
click id=app_create #点击新建按钮
|
||
sleep ${sleep_min}
|
||
input xpath=//*[@id="wannat_vpn_color"]/form/div[1]/div/div/div[1]/input ${name} #输入name
|
||
sleep ${sleep_min}
|
||
#判断是手动输入还是搜索添加,type=1为手动输入,type=2为搜索添加
|
||
run keyword if "${type}"=="1" run keywords sleep ${sleep_min}
|
||
... AND click id=temporary_form #点击添加ip的加号
|
||
... AND sleep ${sleep}
|
||
... AND input xpath=//*[@id="wannat_vpn_color"]/form/div[3]/div/div/div[2]/div[1]/div/div/div[1]/div[1]/div/div[2]/div/input ${ip}[0] #输入ip内容,这里${value}是一个列表
|
||
... AND sleep ${sleep_min}
|
||
... AND SANTIPIF ${j} ${ip} #判断是添加一个ip还是多个ip
|
||
... AND click id=wan_reach_test #点击可达性测试按钮
|
||
... AND Wait Until Element Is Enabled id=edit_0 ${sleep_Wait} #等待时间,等待元素出现后在进行后续操作
|
||
run keyword if "${type}"=="2" run keywords sleep ${sleep_min}
|
||
... AND click id=active-ip #点击 History Active IP按钮
|
||
... AND sleep ${sleep_min}
|
||
... AND input xpath=//*[@id="remoteInput"]/div/div/input ${ip}[0] #搜索输入框输入
|
||
... AND sleep ${sleep_min}
|
||
... AND press keys xpath=//*[@id="remoteInput"]/div/div/input ENTER #回车搜索
|
||
... AND sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="wannat_vpn_color"]/div[1]/div/div/div/div[2]/div[3]/div/div/div[3]/table/tbody/tr #点击搜索到的ip添加
|
||
... AND sleep ${sleep_min}
|
||
... AND SANTIPIF1 ${j} ${ip} #判断是搜索添加一个ip还是多个ip
|
||
... AND click id=wan_reach_test #点击可达性测试按钮
|
||
sleep ${sleep}
|
||
click id=wanAdd_ok #点击ok
|
||
Wait Until Element Is Enabled id=app_create ${sleep_Wait}
|
||
${status} Run Keyword And Return Status Page Should Contain Go to #判断页面是否包含该文本
|
||
Should Be Equal As Strings ${status} True #断言
|
||
sleep ${sleep}
|
||
|
||
EditSNATIPPools
|
||
[Arguments] ${value} ${search} ${name} ${type} ${ip}=null ${j}=1
|
||
Sleep ${sleep_min}
|
||
SNATIPSearch ${value} ${search}
|
||
sleep ${sleep_min}
|
||
click id=appEdit #点击修改按钮
|
||
sleep ${sleep_min}
|
||
Clear Element Text xpath=//*[@id="wannat_vpn_color"]/form/div[1]/div/div/div[1]/input #清空输入框
|
||
sleep ${sleep_min}
|
||
input xpath=//*[@id="wannat_vpn_color"]/form/div[1]/div/div/div[1]/input ${name} #输入name
|
||
sleep ${sleep_min}
|
||
#判断对ip是修改或是新建或删除后新建或不进行修改
|
||
run keyword if "${type}"=="edit" Run Keywords click id=editForm0
|
||
... AND sleep ${sleep_min}
|
||
... AND clear element text xpath=//*[@id="wannat_vpn_color"]/form/div[3]/div/div/div[2]/div[1]/div/div/div[1]/div[1]/div/div[2]/div/input
|
||
... AND sleep ${sleep_min}
|
||
... AND input xpath=//*[@id="wannat_vpn_color"]/form/div[3]/div/div/div[2]/div[1]/div/div/div[1]/div[1]/div/div[2]/div/input ${ip}[0]
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=wan_reach_test
|
||
... AND sleep ${sleep_min}
|
||
run keyword if "${type}"=="create" Run Keywords SNATIPRangeCreate ${j} ${ip}
|
||
... AND click id=wan_reach_test #点击可达性测试按钮
|
||
... AND Wait Until Element Is Enabled id=edit_0 ${sleep_Wait}
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=wan_reach_test
|
||
... AND sleep ${sleep_min}
|
||
run keyword if "${type}"=="delete" Run Keywords click id=delForm0
|
||
... AND sleep ${sleep_min}
|
||
... AND SNATIPRangeCreate ${j} ${ip}
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=wan_reach_test
|
||
... AND sleep ${sleep_min}
|
||
run keyword if "${type}"=="null" log 不做更改
|
||
sleep ${sleep_min}
|
||
click id=wanAdd_ok #点击ok
|
||
Wait Until Element Is Enabled id=app_create ${sleep_Wait}
|
||
${status} Run Keyword And Return Status Page Should Contain Go to #判断页面是否包含该文本
|
||
Should Be Equal As Strings ${status} True #断言
|
||
|
||
SANTIPIF
|
||
[Arguments] ${j} ${ip}
|
||
#多个ip添加
|
||
run keyword if "${j}"!="1" SNATIPRangeCreate ${j} ${ip}
|
||
|
||
SANTIPIF1
|
||
[Arguments] ${j} ${ip}
|
||
#多个ip搜索
|
||
run keyword if "${j}"!="1" SNATIPRangeSearch ${j} ${ip}
|
||
|
||
SNATIPRangeSearch
|
||
[Arguments] ${j} ${ip}
|
||
#for循环添加ip
|
||
sleep ${sleep_min}
|
||
FOR ${i} IN RANGE 1 ${j}
|
||
sleep ${sleep_min}
|
||
Clear Element Text id=insert_profileName #清空输入框
|
||
sleep ${sleep_min}
|
||
input xpath=xpath=//*[@id="remoteInput"]/div/div/input ${ip}[${i}] #搜索输入框输入
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="wannat_vpn_color"]/div[1]/div/div/div/div[2]/div[3]/div/div/div[3]/table/tbody/tr/td[1]/div/span/div #点击搜索到的ip添加
|
||
sleep ${sleep_min}
|
||
END
|
||
SNATIPRangeCreate
|
||
[Arguments] ${j} ${ip}
|
||
#for循环添加ip
|
||
sleep ${sleep_min}
|
||
FOR ${i} IN RANGE 0 ${j}
|
||
sleep ${sleep_min}
|
||
click id=temporary_form
|
||
sleep ${sleep}
|
||
input xpath=//*[@id="wannat_vpn_color"]/form/div[3]/div/div/div[2]/div[1]/div[last()]/div/div[1]/div[1]/div/div[2]/div/input ${ip}[${i}]
|
||
sleep ${sleep_min}
|
||
END
|
||
|
||
SNATIPSearch
|
||
[Arguments] ${value} ${search}
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div/div[2]/div[2]/div/div/div[2]/div/div/div/input #点击搜索框
|
||
sleep ${sleep_min}
|
||
#判断是使用name搜索还是id搜索
|
||
run keyword if "${search}"=="Name" run keywords sleep ${sleep_min}
|
||
... 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[1]/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
|
||
... ELSE IF "${search}"=="ID" run keywords sleep ${sleep_min}
|
||
... 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[1]/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
|
||
... ELSE IF "${search}"=="IP" run keywords sleep ${sleep_min}
|
||
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[4] #xpath=/html/body/div[7]/div[1]/div[1]/ul/li[4]
|
||
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div/div[2]/div[2]/div/i #点击搜索按钮
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="wannat-table"]/div[3]/table/tbody/tr[1]
|
||
sleep ${sleep_min}
|
||
|
||
SNATIPDelete
|
||
[Arguments] ${value} ${search}
|
||
SNATIPSearch ${value} ${search} #搜索需要删除的数据
|
||
click id=appDel #点击删除按钮
|
||
sleep ${sleep}
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep ${sleep}
|
||
|
||
SearchHistoryActiveIP
|
||
[Arguments] ${Number}
|
||
# 获取History Active IP内存在的IP并返回
|
||
OpenPages sidebarSetting_Wannat ip
|
||
click id=app_create
|
||
sleep ${sleep_min}
|
||
click id=active-ip
|
||
sleep ${sleep_min}
|
||
input text xpath=//*[@id="remoteInput"]/div/div/input 192.168.50
|
||
sleep ${sleep_min}
|
||
press keys xpath=//*[@id="remoteInput"]/div/div/input ENTER
|
||
sleep ${sleep}
|
||
${ip1} get text xpath=//*[@id="wannat_vpn_color"]/div[1]/div/div/div/div[2]/div[3]/div[2]/div/div[3]/table/tbody/tr[${Number}]/td[1]/div/span/div[2]
|
||
[Return] ${ip1}
|
||
|
||
CreateVPNAccounts
|
||
[Arguments] ${name} ${passwd} ${search}
|
||
Sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
Sleep ${sleep_min}
|
||
click id=sidebarSetting_Wannat #点击wan net
|
||
sleep ${sleep_min}
|
||
click id=account #点击SNAT-IP-Pools
|
||
sleep ${sleep_min}
|
||
click id=app_create #点击新建按钮
|
||
sleep ${sleep_min}
|
||
input xpath=//*[@id="wannat_vpn_username"]/div/div/div[1]/input ${name} #输入vpnname
|
||
sleep ${sleep_min}
|
||
input xpath=//*[@id="wannat_vpn_password"]/div/div/input ${passwd} #输入密码
|
||
sleep ${sleep_min}
|
||
click id=wanAdd_ok #点击ok按钮
|
||
Wait Until Element Is Enabled xpath=//*[@id="wannat-table"]/div[3]/table/tbody/tr/td[1]/div/div/div[2]/span ${sleep_Wait}
|
||
VPNAccountsSearch ${name} ${search}
|
||
${text1} Get Text xpath=//*[@id="wannat-table"]/div[3]/table/tbody/tr/td[1]/div/div/div[2]/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name} #断言
|
||
|
||
EditVPNAccounts
|
||
[Arguments] ${name} ${passwd} ${search}
|
||
sleep ${sleep_min}
|
||
click id=appEdit #点击修改那妞
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="wannat_vpn_password"]/div/div/span/span/i #点击小眼睛按钮,查看密码
|
||
sleep ${sleep_min}
|
||
Clear Element Text xpath=//*[@id="wannat_vpn_password"]/div/div/span/span/i/../../../input
|
||
sleep ${sleep_min}
|
||
input xpath=//*[@id="wannat_vpn_password"]/div/div/span/span/i/../../../input ${passwd} #修改密码
|
||
sleep ${sleep_min}
|
||
click id=wanAdd_ok #点击OK
|
||
VPNAccountsSearch ${name} ${search}
|
||
${text1} Get Text xpath=//*[@id="wannat-table"]/div[3]/table/tbody/tr/td[1]/div/div/div[2]/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name} #断言
|
||
|
||
VPNAccountsSearch
|
||
[Arguments] ${value} ${search}
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div/div[2]/div[2]/div/div/div[2]/div/div/div/input #点击搜索框
|
||
sleep ${sleep_min}
|
||
click xpath=/html/body/div/div[1]/div[1]/ul/li[2] #点击name
|
||
sleep ${sleep_min}
|
||
input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div/div[2]/div[2]/div/div/div[2]/div/div[1]/div[3]/div/input ${value} #输入值
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div/div[2]/div[2]/div/i #点击搜索按钮
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="wannat-table"]/div[3]/table/tbody/tr[1]
|
||
sleep ${sleep_min}
|
||
|
||
VPNAccountsDelete
|
||
click id=appDel #点击删除按钮
|
||
sleep ${sleep}
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep ${sleep}
|
||
|
||
Source-or-Destination-Search
|
||
[Arguments] ${value}
|
||
run keyword if "${value}"=="IP" run keywords sleep ${sleep_min}
|
||
... AND click id=tab-ip #点击ip
|
||
... AND sleep ${sleep_min}
|
||
run keyword if "${value}"=="SUB ID" run keywords sleep ${sleep_min}
|
||
... AND click id=tab-subscriberid #点击SUB ID
|
||
... AND sleep ${sleep_min}
|
||
run keyword if "${value}"=="Geography" run keywords sleep ${sleep_min}
|
||
... AND click id=tab-Geographic #点击Geography
|
||
... AND sleep ${sleep_min}
|
||
run keyword if "${value}"=="IP Learning" run keywords sleep ${sleep_min}
|
||
... AND click id=tab-ip_learning #点击IP Learning
|
||
... AND sleep ${sleep_min}
|
||
|
||
FQDN-or-Category-Search
|
||
[Arguments] ${value}
|
||
run keyword if "${value}"=="FQDN" run keywords sleep ${sleep_min}
|
||
... AND click id=tab-fqdn #点击FQDN
|
||
... AND sleep ${sleep_min}
|
||
run keyword if "${value}"=="Category" run keywords sleep ${sleep_min}
|
||
... AND click id=tab-fqdn_category #点击category
|
||
... AND sleep ${sleep_min}
|
||
|
||
CreateHijackFiles
|
||
[Arguments] ${name} ${file} ${type} ${search} ${shift}=1 ${input1}=1
|
||
Sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
Sleep ${sleep_min}
|
||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
Sleep ${sleep}
|
||
click id=profilesTabs_Profile_HijackFiles #点击Hijack Files按钮
|
||
Sleep ${sleep_min}
|
||
click id=hijackAdd #点击Create
|
||
Sleep ${sleep}
|
||
input id=hijack_profileName1 ${name} #输入name
|
||
Sleep ${sleep}
|
||
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[2]/div/div/div[1]/input ${file} #上传文件
|
||
Sleep ${sleep}
|
||
${dow_name} Set Variable ${shift}
|
||
${input} Set Variable ${input1}
|
||
run keyword if "${dow_name}"=="close" and "${input}"=="shuru" run keywords sleep ${sleep_min}
|
||
... AND input id=hijack_contentName ${name}
|
||
... ELSE IF "${dow_name}"=="open" click xpath=//*[@id="contentNameChoose"]/div[1]/span[2]
|
||
sleep ${sleep}
|
||
click id=hijackAddContentType #点击+ 打开侧滑窗口
|
||
Sleep ${sleep_min}
|
||
click ${type} #选择文件类型
|
||
sleep ${sleep}
|
||
click id=hijackAddOk1 #点击OK
|
||
Wait Until Element Is Enabled id=hijackAdd ${sleep_Wait}
|
||
Settings-Search ${name} ${search} #搜索框的关键字
|
||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name} #断言
|
||
|
||
CreateInsertScripts
|
||
[Arguments] ${name} ${file} ${type} ${search} ${jstype}=Before Page Load
|
||
Sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
Sleep ${sleep_min}
|
||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
Sleep ${sleep}
|
||
click id=profilesTabs_Profile_Insert #点击Insert Scripts按钮
|
||
Sleep ${sleep_min}
|
||
click id=insertAdd #点击Create
|
||
Sleep ${sleep}
|
||
input id=insert_profileName1 ${name} #输入name
|
||
Sleep ${sleep}
|
||
Choose File xpath=//*[@id="insertAddUpload"]/div[1]/input ${file} #上传文件
|
||
Sleep ${sleep}
|
||
click id=insert_select_format #点击下拉框按钮
|
||
Sleep ${sleep_min}
|
||
run keyword if "${type}"=="css" run keywords sleep ${sleep_min}
|
||
... AND click //span[.="${type}"] #选择css
|
||
run keyword if "${type}"=="js" run keywords sleep ${sleep_min}
|
||
... AND click //span[.="${type}"]
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=insert_select_insertOn #点击下拉框
|
||
... AND sleep ${sleep_min}
|
||
... AND click //span[.="${jstype}"]
|
||
sleep ${sleep_min}
|
||
click id=insertAddOk1 #点击OK
|
||
Wait Until Element Is Enabled id=insertAdd ${sleep_Wait}
|
||
Settings-Search ${name} ${search} #搜索框的关键字
|
||
log psssssssssssssssssssssssssss
|
||
Sleep ${sleep_min}
|
||
${text1} Get Text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||
#//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name} #断言
|
||
|
||
TrafficMirrorProfilesValidationError
|
||
[Arguments] ${name} ${type} ${shuru} ${PromptInformation}
|
||
Sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
Sleep ${sleep_min}
|
||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
Sleep ${sleep}
|
||
click id=profilesTabs_Profile_TrafficMirrorProfiles #点击Traffic Mirror Profiles按钮
|
||
Sleep ${sleep_min}
|
||
click id=trafficMirrorAdd #点击Create
|
||
Sleep ${sleep}
|
||
input id=trafficmirror_profileName1 ${name} #输入name
|
||
Sleep ${sleep}
|
||
click id=addrTypeChoose #点击下拉框
|
||
Sleep ${sleep}
|
||
click ${type} #选择vlan或者mac
|
||
Sleep ${sleep_min}
|
||
input id=trafficmirror_addrArray0 ${shuru}
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1] #点击OK
|
||
sleep ${sleep}
|
||
${text1} Get Text xpath=/html/body/div[last()]/p #获取点击后页面提示信息
|
||
Should Be Equal As Strings ${text1} ${PromptInformation} #断言
|
||
|
||
CreateTrafficMirrorProfiles
|
||
[Arguments] ${name} ${type} ${shuru} ${search}
|
||
Sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
Sleep ${sleep_min}
|
||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
Sleep ${sleep}
|
||
click id=profilesTabs_Profile_TrafficMirrorProfiles #点击Traffic Mirror Profiles按钮
|
||
Sleep ${sleep_min}
|
||
click id=trafficMirrorAdd #点击Create
|
||
Sleep ${sleep}
|
||
input id=trafficmirror_profileName1 ${name} #输入name
|
||
Sleep ${sleep_min}
|
||
click id=addrTypeChoose #点击下拉框
|
||
Sleep ${sleep}
|
||
click ${type} #选择vlan或者mac
|
||
Sleep ${sleep}
|
||
input id=trafficmirror_addrArray0 ${shuru}
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1] #点击OK
|
||
Wait Until Element Is Enabled id=trafficMirrorAdd ${sleep_Wait}
|
||
Settings-Search ${name} ${search} #搜索框的关键字
|
||
Sleep ${sleep}
|
||
${text1} Get Text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name} #断言
|
||
|
||
|
||
EditInsertScripts
|
||
[Arguments] ${id-name} ${name1} ${file} ${type} ${search} ${jstype}=Before Page Load
|
||
[Documentation] 引用关键字,填入必填参数
|
||
... 必填参数:
|
||
... ${search}:为选择要查询的类型是ID或者Name的元素
|
||
... ${id-name}:为查询输入框输入内容
|
||
... ${name1}:为修改页面的name输入框里输入的内容
|
||
... ${file}:为修改页面要上传文件的路径
|
||
... ${type}:选择文件类型的元素
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
sleep ${sleep}
|
||
click id=profilesTabs_Profile_Insert #点击Insert files按钮
|
||
Settings-Search ${id-name} ${search} #搜索框的关键字
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表
|
||
sleep ${sleep_min}
|
||
click id=insertEdit #点击Edit
|
||
sleep ${sleep_min}
|
||
Clear Element Text id=insert_profileName1 #清空输入框
|
||
sleep ${sleep_min}
|
||
input id=insert_profileName1 ${name1} #输入框输入
|
||
sleep ${sleep_min}
|
||
Choose File xpath=//*[@id="insertAddUpload"]/div[1]/input ${file} #上传文件
|
||
sleep ${sleep_min}
|
||
click id=insert_select_format #点击下拉框
|
||
sleep ${sleep_min}
|
||
#选择文件类型
|
||
run keyword if "${type}"=="css" run keywords sleep ${sleep_min}
|
||
... AND click //span[.="${type}"] #选择css
|
||
run keyword if "${type}"=="js" run keywords sleep ${sleep_min}
|
||
... AND click //span[.="${type}"]
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=insert_select_insertOn #点击下拉框
|
||
... AND sleep ${sleep_min}
|
||
... AND click //span[.="${jstype}"]
|
||
sleep ${sleep_min}
|
||
click id=insertAddOk1 #点击ok提交
|
||
run keyword if "${search}"=="id" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${id-name} ${search} #搜索框的关键字
|
||
... ELSE IF "${search}"=="name" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${name1} ${search} #搜索框的关键字
|
||
sleep ${sleep_min}
|
||
${text1} Get Text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name1} #断言
|
||
|
||
|
||
CreateResponsePages
|
||
[Arguments] ${name} ${file} ${search}
|
||
[Documentation] 引用次关键字,填入必填参数
|
||
... 必填参数:
|
||
... ${name}:新建页面name输入框里的内容
|
||
... ${file}:上传文件所在本地的路径
|
||
#打开浏览器
|
||
#ui-login lyf 111111
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
sleep ${sleep}
|
||
click id=respinseAdd #Response Pages点击Create
|
||
sleep ${sleep}
|
||
input id=responsepages_profileName1 ${name} #输入name
|
||
sleep ${sleep}
|
||
Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件
|
||
sleep ${sleep}
|
||
click id=responseAddOk1 #点击OK缇交
|
||
Wait Until Element Is Enabled xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span ${sleep_Wait}
|
||
Settings-Search ${name} ${search} #搜索框的关键字
|
||
sleep ${sleep_min}
|
||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name} #断言
|
||
|
||
Edit-Response-Pages
|
||
[Arguments] ${id-name} ${name1} ${file} ${search}
|
||
[Documentation] 引用关键字,填入必填参数
|
||
... 必填参数:
|
||
... ${search}:为选择要查询的类型是ID或者Name
|
||
... ${id-name}:为查询输入框输入内容
|
||
... ${name1}:为修改页面的name输入框里输入的内容
|
||
... ${file}:为修改页面要上传文件的路径
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
sleep ${sleep}
|
||
Settings-Search ${id-name} ${search} #搜索框的关键字
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表
|
||
sleep ${sleep_min}
|
||
click id=resinseEdit #点击Edit
|
||
sleep ${sleep_min}
|
||
Clear Element Text id=responsepages_profileName1 #清空name输入框
|
||
sleep ${sleep_min}
|
||
input id=responsepages_profileName1 ${name1}
|
||
sleep ${sleep_min}
|
||
Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[5]/div/div/div/input ${file}
|
||
sleep ${sleep_min}
|
||
click id=responseAddOk1
|
||
sleep ${sleep_min}
|
||
run keyword if "${search}"=="id" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${id-name} ${search} #搜索框的关键字
|
||
... ELSE IF "${search}"=="name" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${name1} ${search} #搜索框的关键字
|
||
sleep ${sleep_min}
|
||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name1} #断言
|
||
|
||
EditHijackFiles
|
||
[Arguments] ${id-name} ${name1} ${file} ${type} ${search} ${shift}=1
|
||
... ${input1}=1
|
||
[Documentation] 引用关键字,填入必填参数
|
||
... 必填参数:
|
||
... ${search}:为选择要查询的类型是ID或者Name的元素
|
||
... ${id-name}:为查询输入框输入内容
|
||
... ${name1}:为修改页面的name输入框里输入的内容
|
||
... ${file}:为修改页面要上传文件的路径
|
||
... ${type}:为文件类型的元素
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
sleep ${sleep}
|
||
click id=profilesTabs_Profile_HijackFiles #点击Hijack files按钮
|
||
sleep ${sleep_min}
|
||
Settings-Search ${id-name} ${search} #搜索框的关键字
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表
|
||
sleep ${sleep_min}
|
||
click id=hijackEdit #点击Edit
|
||
sleep ${sleep_min}
|
||
Clear Element Text id=hijack_profileName1 #清空输入框
|
||
sleep ${sleep_min}
|
||
input id=hijack_profileName1 ${name1} #输入框输入
|
||
sleep ${sleep_min}
|
||
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[5]/div/div/div[1]/input ${file} #上传文件
|
||
sleep ${sleep_min}
|
||
${dow_name} Set Variable ${shift}
|
||
${input} Set Variable ${input1}
|
||
run keyword if "${dow_name}"=="close" and "${input}"=="shuru" run keywords sleep ${sleep_min}
|
||
... AND input id=hijack_contentName ${name}
|
||
... ELSE IF "${dow_name}"=="open" click xpath=//*[@id="contentNameChoose"]/div[1]/span[2]
|
||
sleep ${sleep}
|
||
click id=hijackAddContentType #点击+号打开侧滑框
|
||
sleep 3
|
||
click ${type} #选择类型
|
||
sleep ${sleep_min}
|
||
click id=rigth-menu-button-close #关闭侧滑框
|
||
sleep ${sleep_min}
|
||
click id=hijackAddOk1 #点击ok提交
|
||
Wait Until Element Is Enabled id=hijackAdd ${sleep_Wait}
|
||
run keyword if "${search}"=="id" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${id-name} ${search} #搜索框的关键字
|
||
... ELSE IF "${search}"=="name" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${name1} ${search}
|
||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name1} #断言
|
||
|
||
EditTrafficMirrorProfiles
|
||
[Arguments] ${id-name} ${name1} ${type} ${shuju} ${search}
|
||
[Documentation] 引用关键字,填入必填参数
|
||
... 必填参数:
|
||
... ${search}:为选择要查询的类型是ID或者Name的元素
|
||
... ${id-name}:为查询输入框输入内容
|
||
... ${name1}:为修改页面的name输入框里输入的内容
|
||
... ${type}:为选择点击vlan或mac的元素
|
||
... ${shuju}:为输入框输入内容
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
sleep ${sleep}
|
||
click id=profilesTabs_Profile_TrafficMirrorProfiles #点击Traffic Mirror Profiles按钮
|
||
sleep ${sleep_min}
|
||
Settings-Search ${id-name} ${search} #搜索框的关键字
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[2]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表
|
||
sleep ${sleep_min}
|
||
click id=trafficMirrorEdit #点击Edit
|
||
sleep ${sleep_min}
|
||
Clear Element Text id=trafficmirror_profileName1 #清空输入框
|
||
sleep ${sleep_min}
|
||
input id=trafficmirror_profileName1 ${name1} #输入框输入
|
||
sleep ${sleep_min}
|
||
click id=addrTypeChoose #点击下拉框
|
||
sleep ${sleep_min}
|
||
click ${type} #选择vlan或者mac
|
||
sleep ${sleep_min}
|
||
Clear Element Text id=trafficmirror_addrArray0 #清空输入框
|
||
sleep ${sleep_min}
|
||
input id=trafficmirror_addrArray0 ${shuju} #输入内容
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1] #点击ok
|
||
Wait Until Element Is Enabled id=trafficMirrorAdd ${sleep_Wait}
|
||
run keyword if "${search}"=="id" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${id-name} ${search} #搜索框的关键字
|
||
... ELSE IF "${search}"=="name" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${name1} ${search} #搜索框的关键字
|
||
sleep ${sleep_min}
|
||
${text1} Get Text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name1} #断言
|
||
|
||
importTrustedCertificateAuthorities
|
||
[Arguments] ${name} ${file} ${search}
|
||
[Documentation] 引用次关键字,填入必填参数
|
||
... 必填参数:
|
||
... ${name}:新建页面name输入框里的内容
|
||
... ${file}:上传文件所在本地的路径
|
||
#打开浏览器
|
||
#ui-login lyf 111111
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||
sleep ${sleep}
|
||
click id=app_create #点击Import
|
||
sleep ${sleep}
|
||
input id=authoritiesAdd_name1 ${name} #输入name
|
||
sleep ${sleep}
|
||
Choose File xpath=//*[@id="upload_dome"]/div/input ${file} #上传文件
|
||
sleep ${sleep}
|
||
click id=authoritiesAdd_sub #点击OK缇交
|
||
Wait Until Element Is Enabled id=app_create ${sleep_Wait}
|
||
Settings-Search ${name} ${search}
|
||
sleep ${sleep}
|
||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name} #断言
|
||
|
||
importTrustedCertificateAuthoritiesErrorVerification
|
||
[Arguments] ${name} ${file} ${PromptInformation}
|
||
[Documentation] 用于验证导入错误的证书类型
|
||
... 必填参数:
|
||
... ${name}:新建页面name输入框里的内容
|
||
... ${file}:上传文件所在本地的路径
|
||
... ${PromptInformation}:提示信息
|
||
#打开浏览器
|
||
#ui-login lyf 111111
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||
sleep ${sleep}
|
||
click id=Authorities_create #点击Import
|
||
sleep ${sleep}
|
||
input id=authoritiesAdd_name1 ${name} #输入name
|
||
sleep ${sleep}
|
||
Choose File xpath=//*[@id="upload_dome"]/div/input ${file} #上传文件
|
||
sleep ${sleep}
|
||
click id=authoritiesAdd_sub #点击OK缇交
|
||
sleep ${sleep}
|
||
${text} Get text xpath=/html/body/div[last()]/p
|
||
Should Be Equal As Strings ${text} ${PromptInformation} #断言
|
||
|
||
CreateDecryptionKeyrings
|
||
[Arguments] ${name} ${file} ${file1} ${ExpiryHours1or2} ${type} ${type1} ${search}
|
||
... ${shift}=close ${PrivateKeyType}=PrivateKeyFile
|
||
[Documentation] 引用次关键字,填入必填参数
|
||
... 必填参数:
|
||
... ${name}:新建页面name输入框里的内容
|
||
... ${file}:上传文件所在本地的路径
|
||
... ${file1}:上传文件所在本地的路径
|
||
... ${ExpiryHours1or2}:根证书时间填入1:自定义定义 2:原时间
|
||
... ${type}:上传证书类型的元素
|
||
... ${type1}:上传证书加密解密算法的元素
|
||
... ${shift}:是否打开客户端包含证书按钮
|
||
... ${PrivateKeyType}:私钥类型
|
||
#打开浏览器
|
||
#ui-login lyf 111111
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="proxyTabs"]/div/ul/li[2] #点击Decryption Keyrings
|
||
sleep ${sleep_min}
|
||
click id=app_create #点击Create
|
||
sleep ${sleep}
|
||
input id=keyringsadd_name1 ${name} #输入name
|
||
sleep ${sleep}
|
||
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件
|
||
sleep ${sleep}
|
||
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[3]/div/div[2]/div/div/input ${file1} #上传文件
|
||
${select} Set Variable ${ExpiryHours1or2}
|
||
Run Keyword If '${select}'=='1' click id=keyringsadd_customized
|
||
Run Keyword If '${select}'=='1' input id=reissueExpiryDate 10
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[6]/div/div/div[1]/span/span/i #点击下拉框
|
||
sleep ${sleep_min}
|
||
click ${type} #选择证书类型
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[7]/div/div/div[1]/span/span/i #点击下拉框
|
||
sleep ${sleep_min}
|
||
click ${type1} #选择加密解密类型
|
||
sleep ${sleep_min}
|
||
${root} Set Variable ${shift}
|
||
run keyword if "${root}"=="open" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[9]/div/div/span
|
||
... ELSE IF "${root}"=="close" log "go on"
|
||
Run Keyword If '${PrivateKeyType}'=='HSM' run keywords sleep ${sleep_min}
|
||
... AND click id=privateHSM
|
||
... AND sleep ${sleep_min}
|
||
... AND input id=keyringsadd_slotid 10
|
||
sleep ${sleep_min}
|
||
click id=keyringsadd_sub #点击OK缇交
|
||
Wait Until Element Is Enabled id=app_create ${sleep_Wait}
|
||
Settings-Search ${name} ${search}
|
||
sleep ${sleep_min}
|
||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name} #断言
|
||
|
||
DecryptionKeyringsErrorVerification
|
||
[Arguments] ${name} ${file} ${file1} ${type} ${type1} ${Positioning} ${Assertion}
|
||
[Documentation] 用于验证导入证书和类型不匹配的错误验证
|
||
... 必填参数:
|
||
... ${name}:新建页面name输入框里的内容
|
||
... ${file}:上传文件所在本地的路径
|
||
... ${file1}:上传文件所在本地的路径
|
||
... ${type}:上传证书类型的元素
|
||
... ${type1}:上传证书加密解密算法的元素
|
||
... ${Positioning}:获取文本的xpath定位
|
||
... ${Assertion}:断言信息
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="proxyTabs"]/div/ul/li[2] #点击Decryption Keyrings
|
||
sleep ${sleep_min}
|
||
click id=app_create #点击Create
|
||
sleep ${sleep}
|
||
input id=keyringsadd_name1 ${name} #输入name
|
||
sleep ${sleep}
|
||
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件
|
||
sleep ${sleep}
|
||
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[3]/div/div[2]/div/div/input ${file1} #上传文件
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[6]/div/div/div[1]/span/span/i #点击下拉框
|
||
sleep ${sleep_min}
|
||
click ${type} #选择证书类型
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[7]/div/div/div[1]/span/span/i #点击下拉框
|
||
sleep ${sleep_min}
|
||
click ${type1} #选择加密解密类型
|
||
sleep ${sleep_min}
|
||
click id=keyringsadd_sub #点击OK缇交
|
||
Wait Until Element Is Enabled xpath=${Positioning} ${sleep_Wait}
|
||
${text1} Get Text xpath=${Positioning} #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${Assertion} #断言
|
||
|
||
DecryptionKeyringsSearch
|
||
[Arguments] ${id} ${name}
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span/div/div/div[2]/div/div/div[1]/input
|
||
sleep ${sleep_min}
|
||
click xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
||
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 ${id}
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
|
||
sleep ${sleep_min}
|
||
click xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
||
input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span/div/div/div[2]/div/div[2]/div[3]/div/input ${name}
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span/div/i
|
||
sleep ${sleep}
|
||
|
||
CreateSSLDecryptionExclusion
|
||
[Arguments] ${name} ${value} ${name1} ${search}
|
||
[Documentation] 引用次关键字,填入必填参数
|
||
... 必填参数:
|
||
... ${name}:新建页面name输入框里的内容
|
||
... ${value}:输入内容
|
||
... ${naem1}:搜索框填入内容
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="proxyTabs"]/div/ul/li[3] #点击SSL Decryption Exclusion按钮
|
||
sleep ${sleep_min}
|
||
click id=ssl_create #点击Create
|
||
sleep ${sleep}
|
||
input id=sslAdd_name1 ${name} #输入name
|
||
sleep ${sleep}
|
||
input id=sslAdd_itemDesc ${value} #输入内容
|
||
sleep ${sleep}
|
||
click id=ssl_ok #点击OK缇交
|
||
Wait Until Element Is Enabled xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span ${sleep_Wait}
|
||
Settings-Search ${name1} ${search}
|
||
sleep ${sleep_min}
|
||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name} #断言
|
||
|
||
CreateSSLDecryptionExclusionErrorVerification
|
||
[Arguments] ${name} ${value} ${AssertionPath} ${AssertionText}
|
||
[Documentation] 用于SSL Decryption Exclusion创建页面错误提示信息验证
|
||
... 必填参数:
|
||
... ${name}:新建页面name输入框里的内容
|
||
... ${value}:输入内容
|
||
... ${AssertionPath}:提示信息Xpath定位
|
||
... ${AssertionText}:错误提示信息文本
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="proxyTabs"]/div/ul/li[3] #点击SSL Decryption Exclusion按钮
|
||
sleep ${sleep_min}
|
||
click id=ssl_create #点击Create
|
||
sleep ${sleep}
|
||
input id=sslAdd_name1 ${name} #输入name
|
||
sleep ${sleep}
|
||
input id=sslAdd_itemDesc ${value} #输入内容
|
||
sleep ${sleep}
|
||
click id=ssl_ok #点击OK缇交
|
||
sleep ${sleep}
|
||
${text} get text xpath=${AssertionPath}
|
||
Should Be Equal As Strings ${text} ${AssertionText}
|
||
|
||
CachedIntermediateCertificatesSearch
|
||
[Arguments] ${Condition} ${AssertionPath} ${search}
|
||
sleep ${sleep_min}
|
||
Settings-Search ${Condition} ${search}
|
||
sleep ${sleep}
|
||
${text} get text ${AssertionPath}
|
||
Should Be Equal As Strings ${text} ${Condition}
|
||
|
||
|
||
EditTrustedCertificateAuthorities
|
||
[Arguments] ${id-name} ${name} ${file} ${search}
|
||
[Documentation] 引用关键字,填入必填参数
|
||
... 必填参数:
|
||
... ${search}:为选择要查询的类型是ID或者Name的元素
|
||
... ${id-name}:为查询输入框输入内容
|
||
... ${name}:为修改页面的name输入框里输入的内容
|
||
... ${file}:为修改页面要上传文件的路径
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||
sleep ${sleep}
|
||
Settings-Search ${id-name} ${search}
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] #点击搜索列表
|
||
sleep ${sleep_min}
|
||
click id=appEdit #点击Edit按钮
|
||
sleep ${sleep_min}
|
||
Clear Element Text id=authoritiesAdd_name1 #清空name输入框
|
||
sleep ${sleep_min}
|
||
input id=authoritiesAdd_name1 ${name} #输入name
|
||
sleep ${sleep_min}
|
||
Choose File xpath=//*[@id="upload_dome"]/div/input ${file} #上传文件
|
||
sleep ${sleep_min}
|
||
click id=authoritiesAdd_sub #点击ok
|
||
sleep ${sleep_min}
|
||
|
||
EditDecryptionKeyrings
|
||
[Arguments] ${id-name} ${name} ${file} ${file1} ${1or2}
|
||
... ${type} ${type1} ${search}
|
||
[Documentation] 引用次关键字,填入必填参数
|
||
... 必填参数:
|
||
... ${search}:为选择要查询的类型是ID或者Name的元素
|
||
... ${id-name}:为查询输入框输入内容
|
||
... ${name}:新建页面name输入框里的内容
|
||
... ${file}:上传文件所在本地的路径
|
||
... ${file1}:上传文件所在本地的路径
|
||
... ${1or2}:填入1 或者其他
|
||
... ${type}:上传证书类型的元素
|
||
... ${type1}:上传证书加密解密算法的元素
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="proxyTabs"]/div/ul/li[2] #点击Decryption Keyrings
|
||
sleep ${sleep_min}
|
||
Settings-Search ${id-name} ${search}
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr #点击搜索列表
|
||
sleep ${sleep_min}
|
||
click id=appEdit #点击Edit按钮
|
||
sleep ${sleep_min}
|
||
Clear Element Text id=keyringsadd_name1 #清空name输入框
|
||
sleep ${sleep_min}
|
||
input id=keyringsadd_name1 ${name} #输入name
|
||
sleep ${sleep_min}
|
||
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[5]/div/div/div/input ${file} #上传文件
|
||
sleep ${sleep}
|
||
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[6]/div/div[2]/div/div/input ${file1} #上传文件
|
||
${select} Set Variable ${1or2}
|
||
Run Keyword If '${select}'=='1' click id=keyringsadd_customized
|
||
Run Keyword If '${select}'=='1' input id=reissueExpiryDate 10
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[9]/div/div/div[1]/span/span/i #点击下拉框
|
||
sleep ${sleep_min}
|
||
click ${type} #选择证书类型
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/div[2]/form/div[10]/div/div/div[1]/span/span/i #点击下拉框
|
||
sleep ${sleep}
|
||
click ${type1} #选择加密解密类型
|
||
sleep ${sleep_min}
|
||
click id=keyringsadd_sub #点击OK缇交
|
||
Wait Until Element Is Enabled id=app_create ${sleep_Wait}
|
||
run keyword if "${search}"=="id" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${id-name} ${search}
|
||
... ELSE IF "${search}"=="name" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${name} ${search}
|
||
sleep ${sleep_min}
|
||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name} #断言
|
||
|
||
EditSSLDecryptionExclusion
|
||
[Arguments] ${id-name} ${name} ${value1} ${name1} ${search}
|
||
[Documentation] 引用关键字,填入必填参数
|
||
... ${search}:id或者name的元素
|
||
... ${id-name}:输入搜索的内容
|
||
... ${name}:输入name
|
||
... ${calue1}:输入内容
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="proxyTabs"]/div/ul/li[3] #点击SSL Decryption Exclusion按钮
|
||
sleep ${sleep_min}
|
||
Settings-Search ${id-name} ${search}
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr #点击搜索列表
|
||
sleep ${sleep_min}
|
||
click id=ssl_edit #点击Edit
|
||
sleep ${sleep_min}
|
||
Clear Element Text id=sslAdd_name1 #清空name输入框
|
||
sleep ${sleep_min}
|
||
input id=sslAdd_name1 ${name} #输入name
|
||
sleep ${sleep_min}
|
||
input id=sslAdd_itemDesc ${value1} #输入内容
|
||
sleep ${sleep_min}
|
||
click id=ssl_ok #点击OK缇交
|
||
Wait Until Element Is Enabled id=ssl_create ${sleep_Wait}
|
||
run keyword if "${search}"=="id" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${id-name} ${search}
|
||
... ELSE IF "${search}"=="name" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${name1} ${search}
|
||
sleep ${sleep_min}
|
||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span #获取点击后页面文本信息
|
||
Should Be Equal As Strings ${text1} ${name} #断言
|
||
|
||
EditDefaultCertificate
|
||
[Arguments] ${time}
|
||
[Documentation] 验证修改默认证书方法
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr
|
||
sleep ${sleep_min}
|
||
click id=appEdit
|
||
sleep ${sleep}
|
||
clear element text id=reissueExpiryDate
|
||
sleep ${sleep_min}
|
||
input text id=reissueExpiryDate ${time}
|
||
sleep ${sleep_min}
|
||
click id=keyringsadd_sub
|
||
Wait Until Element Is Enabled id=app_create ${sleep_Wait}
|
||
|
||
CreateSSLFingerprint
|
||
[Arguments] ${Ja3} ${Pinning} ${search} ${Description}=null
|
||
[Documentation]
|
||
... ${Ja3}:指纹信息
|
||
... ${Pinning}:是否Pinning(Yes/No)
|
||
... ${search}:查询条件
|
||
... ${Description}:描述
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Certificate Managements
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="proxyTabs"]/div/ul/li[5] #点击SSL Fingerprint
|
||
sleep ${sleep_min}
|
||
click id=Fingerprint_create #点击Create
|
||
sleep ${sleep_min}
|
||
input id=authoritiesAdd_name1 ${Ja3}
|
||
run keyword if "${Pinning}"=="Yes" run keywords sleep ${sleep_min}
|
||
... AND click id=pinningStateYes
|
||
run keyword if "${Pinning}"=="No" run keywords sleep ${sleep_min}
|
||
... AND click id=pinningStateNo
|
||
sleep ${sleep_min}
|
||
run keyword if "${Description}"!="null" run keywords sleep ${sleep_min}
|
||
... AND input id=labels_describe ${Description}
|
||
sleep ${sleep_min}
|
||
click id=authoritiesAdd_sub # 点击Ok按钮
|
||
Wait Until Element Is Enabled xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/div/span/div[2]/span ${sleep_Wait}
|
||
Settings-Search ${Ja3} ${search}
|
||
${text} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/div/span/div[2]/span
|
||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[3]/div/div/div/p/span
|
||
Should Be Equal As Strings ${text} ${Ja3}
|
||
Should Be Equal As Strings ${text1} ${Pinning}
|
||
|
||
EditSSLFingerprint
|
||
[Arguments] ${ID-Ja3} ${NewJa3} ${Pinning} ${search} ${Description}=null
|
||
[Documentation]
|
||
... ${ID-Ja3}:id或JA3Hash的元素
|
||
... ${NewJa3}:指纹信息
|
||
... ${Pinning}:是否Pinning(Yes/No)
|
||
... ${search}:查询条件 id 或JA3Hash
|
||
... ${Description}:描述
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Certificate Managements
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="proxyTabs"]/div/ul/li[5] #点击SSL Fingerprint
|
||
sleep ${sleep_min}
|
||
Settings-Search ${ID-Ja3} ${search}
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr
|
||
sleep ${sleep_min}
|
||
click id=Fingerprint_edit
|
||
sleep ${sleep_min}
|
||
input id=authoritiesAdd_name1 ${NewJa3}
|
||
run keyword if "${Pinning}"=="Yes" run keywords sleep ${sleep_min}
|
||
... AND click id=pinningStateYes
|
||
run keyword if "${Pinning}"=="No" run keywords sleep ${sleep_min}
|
||
... AND click id=pinningStateNo
|
||
sleep ${sleep_min}
|
||
run keyword if "${Description}"!="null" run keywords sleep ${sleep_min}
|
||
... AND input id=labels_describe ${Description}
|
||
sleep ${sleep_min}
|
||
click id=authoritiesAdd_sub
|
||
Wait Until Element Is Enabled xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/div/span/div[2]/span ${sleep_Wait}
|
||
run keyword if "${search}"=="id" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${ID-Ja3} ${search}
|
||
run keyword if "${search}"=="JA3Hash" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${NewJa3} ${search}
|
||
${text} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/div/span/div[2]/span
|
||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[3]/div/div/div/p/span
|
||
Should Be Equal As Strings ${text} ${NewJa3}
|
||
Should Be Equal As Strings ${text1} ${Pinning}
|
||
|
||
SSLFingerprintImportUserAgent
|
||
[Arguments] ${ID} ${file} ${USQuantity} ${AssertionText} ${USXpath}
|
||
[Documentation]
|
||
... ${ID} :断言指纹得ID
|
||
... ${file}:上传文件路径
|
||
... ${USQuantity} :导入文件对应指纹信息US得数量
|
||
... ${AssertionText}:断言得US
|
||
... ${USXpath}:被断言US得xpath定位
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Certificate Managements
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="proxyTabs"]/div/ul/li[5] #点击SSL Fingerprint
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span[2]/button
|
||
sleep ${sleep}
|
||
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[4]/div/div/div[2]/div/div[1]/input ${file}
|
||
sleep ${sleep}
|
||
click id=Import_ua_Ok
|
||
sleep 5
|
||
Settings-Search ${ID} id
|
||
sleep ${sleep}
|
||
Mouse Over xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/div/span/div/span
|
||
sleep 3
|
||
run keyword if "${USQuantity}" >= "4" run keywords sleep ${sleep_min}
|
||
... AND click xpath=/html/body/div[last()]/ul/li/div[2]/span[2]/span[4]
|
||
... AND sleep ${sleep}
|
||
${text} Get Text xpath=${USXpath}
|
||
Should Be Equal As Strings ${text} ${AssertionText}
|
||
run keyword if "${USQuantity}" >= "4" run keywords sleep ${sleep_min}
|
||
... AND click id=useragent_cancle
|
||
... AND sleep ${sleep_min}
|
||
|
||
SSLFingerprintImportJA3
|
||
[Arguments] ${file}
|
||
[Documentation]
|
||
... ${file}:上传文件路径
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_CertificateManagement #点击二级目录Certificate Managements
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="proxyTabs"]/div/ul/li[5] #点击SSL Fingerprint
|
||
sleep ${sleep_min}
|
||
click id=objectImport
|
||
sleep ${sleep}
|
||
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/div[2]/div[2]/div/div[1]/div/div/div[1]/div/form/div[1]/div/div/div[1]/input ${file}
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/div[2]/div[2]/div/div[1]/div/div/div[1]/div/form/div[2]/div/button
|
||
sleep ${sleep}
|
||
|
||
|
||
Settings_swarch_name
|
||
[Arguments] ${name}
|
||
sleep ${sleep}
|
||
click element id=one-input
|
||
sleep ${sleep}
|
||
click element id=input_list_li2
|
||
sleep ${sleep}
|
||
input text id=sreach_input ${name}
|
||
sleep ${sleep}
|
||
click element id=select_new_search_btn
|
||
sleep ${sleep}
|
||
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table
|
||
|
||
Create-Policy_Verify
|
||
[Arguments] ${name} ${list2}=null ${fail1}=null ${list4}=null ${list6}=null ${min1}=null
|
||
... ${max1}=null
|
||
sleep ${sleep_min}
|
||
click id=children5 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
sleep ${sleep}
|
||
click id=profilesTabs_Profile_DecryptionProfile #点击Decryption Profile
|
||
sleep ${sleep_min}
|
||
click id=insertAdd #点击Create
|
||
sleep ${sleep_min}
|
||
input id=insert_profileName ${name}
|
||
sleep ${sleep_min}
|
||
@{list} Create List Common Name Issuer Self-signed Expiry Date Mutual Authentication
|
||
... On Protocol Errors Certificate Pinning Mirror Client Versions Allow HTTP/2
|
||
: FOR ${i} IN @{list}
|
||
\ click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), "${i}")]/following-sibling::div/div/span
|
||
\ sleep ${sleep_min}
|
||
@{list1} Set Variable ${list2}
|
||
${fail} Set Variable ${fail1}
|
||
: FOR ${j} IN @{list1}
|
||
\ run keyword if "@{list1}"=="[]" Exit for loop
|
||
\ ... ELSE Run Keywords click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), "${j}")]/following-sibling::div/div/span
|
||
\ ... AND sleep ${sleep_min}
|
||
run keyword if "${fail}"=="Fail-close" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[5]/div/div/label[1]/span
|
||
... ELSE IF "${fail}"=="Pass-through" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[5]/div/div/label[2]/span
|
||
... ELSE log 1111
|
||
@{list3} Set Variable ${list4}
|
||
: FOR ${k} IN @{list3}
|
||
\ run keyword if "@{list3}"=="[]" Exit for loop
|
||
\ ... ELSE Run Keywords click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), "${k}")]/following-sibling::div/div/span
|
||
\ ... AND sleep ${sleep_min}
|
||
@{list5} Set Variable ${list6}
|
||
${min} Set Variable ${min1}
|
||
${max} Set Variable ${max1}
|
||
: FOR ${z} IN @{list5}
|
||
\ run keyword if "@{list5}"=="[]" Min_max_version ${min} ${max}
|
||
\ ... ELSE IF "${z}"=="Allow HTTP/2" Run Keywords sleep ${sleep_min}
|
||
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), "${z}")]/following-sibling::div/div/span
|
||
\ ... ELSE IF "${z}"=="Mirror Client Versions" Run Keywords sleep ${sleep_min}
|
||
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), "${z}")]/following-sibling::div/div/span
|
||
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${min}"=="TLSv1.0" Run Keywords sleep ${sleep_min}
|
||
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=pro_min1
|
||
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${min}"=="TLSv1.1" Run Keywords sleep ${sleep_min}
|
||
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=pro_min2
|
||
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${min}"=="TLSv1.2" Run Keywords sleep ${sleep_min}
|
||
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=pro_min3
|
||
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${min}"=="TLSv1.3" Run Keywords sleep ${sleep_min}
|
||
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=pro_min4
|
||
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${min}"=="SSLv3.0" Run Keywords sleep ${sleep_min}
|
||
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=pro_max0
|
||
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${max}"=="TLSv1.0" Run Keywords sleep ${sleep_min}
|
||
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=pro_max1
|
||
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${max}"=="TLSv1.1" Run Keywords sleep ${sleep_min}
|
||
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=pro_max2
|
||
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${max}"=="TLSv1.2" Run Keywords sleep ${sleep_min}
|
||
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=pro_max3
|
||
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${max}"=="TLSv1.3" Run Keywords sleep ${sleep_min}
|
||
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=pro_max4
|
||
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${max}"=="SSLv3.0" Run Keywords sleep ${sleep_min}
|
||
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=pro_max0
|
||
sleep ${sleep_min}
|
||
run keyword if "@{list5}"=="[]" Min_max_version ${min} ${max}
|
||
${class}= Get Element Attribute xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[1]/div/div class
|
||
log ${class}
|
||
click id=insertAddOk1
|
||
|
||
Min_max_version
|
||
[Arguments] ${min} ${max}
|
||
run keyword if "${min}"=="TLSv1.0" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min1
|
||
... ELSE IF "${min}"=="TLSv1.1" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min2
|
||
... ELSE IF "${min}"=="TLSv1.2" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min3
|
||
... ELSE IF "${min}"=="TLSv1.3" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min4
|
||
... ELSE IF "${min}"=="SSLv3.0" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max0
|
||
... ELSE log 错误
|
||
run keyword if "${max}"=="TLSv1.0" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max1
|
||
... ELSE IF "${max}"=="TLSv1.1" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max2
|
||
... ELSE IF "${max}"=="TLSv1.2" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max3
|
||
... ELSE IF "${max}"=="TLSv1.3" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max4
|
||
... ELSE IF "${max}"=="SSLv3.0" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max0
|
||
... ELSE log 错误
|
||
|
||
CreateDecryptionProfile
|
||
[Arguments] ${name} ${search} ${dict1}=null ${fail1}=null ${min1}=null ${max1}=null
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
sleep ${sleep}
|
||
click id=profilesTabs_Profile_DecryptionProfile #点击Decryption Profile
|
||
sleep ${sleep_min}
|
||
click id=insertAdd #点击Create
|
||
sleep ${sleep_min}
|
||
input id=decrytion_profileName1 ${name}
|
||
sleep ${sleep_min}
|
||
ButtonSwitch ${dict1} //*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), " ")]/following-sibling::div/div el-switch is-checked el-switch
|
||
${fail} Set Variable ${fail1}
|
||
run keyword if "${fail}"=="Fail-close" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[5]/div/div/label[1]/span
|
||
... ELSE IF "${fail}"=="Pass-through" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[5]/div/div/label[2]/span
|
||
... ELSE log 1111
|
||
${min} Set Variable ${min1}
|
||
${max} Set Variable ${max1}
|
||
run keyword if "${min}"=="TLSv1.0" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min1
|
||
... ELSE IF "${min}"=="TLSv1.1" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min2
|
||
... ELSE IF "${min}"=="TLSv1.2" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min3
|
||
... ELSE IF "${min}"=="TLSv1.3" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min4
|
||
... ELSE IF "${min}"=="SSLv3.0" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min0
|
||
... ELSE log 错误
|
||
run keyword if "${max}"=="TLSv1.0" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max1
|
||
... ELSE IF "${max}"=="TLSv1.1" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max2
|
||
... ELSE IF "${max}"=="TLSv1.2" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max3
|
||
... ELSE IF "${max}"=="TLSv1.3" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max4
|
||
... ELSE IF "${max}"=="SSLv3.0" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max0
|
||
... ELSE log 错误
|
||
sleep ${sleep}
|
||
click id=decryption-ok
|
||
Wait Until Element Is Enabled xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span ${sleep_Wait}
|
||
sleep ${sleep_min}
|
||
Settings-Search ${name} ${search} #搜索框的关键字
|
||
sleep ${sleep}
|
||
${name1} get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span
|
||
Should Be Equal As Strings ${name1} ${name}
|
||
|
||
|
||
ButtonSwitch
|
||
[Arguments] ${dict1} ${xpath1} ${xpath2} ${open} ${close}
|
||
${dict} Set Variable ${dict1}
|
||
FOR ${list} ${key} IN ENUMERATE @{dict}
|
||
${class}= Get Element Attribute xpath=${xpath1}${key}${xpath2} class
|
||
run keyword if "${class}"=="${open}" and "${dict}[${key}]"=="1" log 默认开启,不进行操作
|
||
run keyword if "${class}"=="${open}" and "${dict}[${key}]"=="0" Run Keywords log 默认开启,但需求需要关闭,进行点击关闭按钮
|
||
... AND sleep ${sleep_min}
|
||
... AND click xpath=${xpath1}${key}${xpath2}/span
|
||
run keyword if "${class}"=="${close}" and "${dict}[${key}]"=="1" Run Keywords log 默认关闭,但需求需要开启,进行点击开启按钮
|
||
... AND sleep ${sleep_min}
|
||
... AND click xpath=${xpath1}${key}${xpath2}/span
|
||
run keyword if "${class}"=="${close}" and "${dict}[${key}]"=="0" log 默认关闭,不进行操作
|
||
END
|
||
EditDecryptionProfile
|
||
[Arguments] ${id-name} ${name} ${search} ${dict1}=null ${fail1}=null ${min1}=null
|
||
... ${max1}=null
|
||
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
sleep ${sleep}
|
||
click id=profilesTabs_Profile_DecryptionProfile #点击Decryption Profile
|
||
sleep ${sleep_min}
|
||
Settings-Search ${id-name} ${search} #搜索框的关键字
|
||
Wait Until Element Is Enabled xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span ${sleep_Wait}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span #点击搜索列表
|
||
sleep ${sleep_min}
|
||
click id=insertEdit #点击Edit
|
||
sleep ${sleep}
|
||
Clear Element Text id=decrytion_profileName1 #清空name输入框
|
||
sleep ${sleep_min}
|
||
input id=decrytion_profileName1 ${name} #输入name
|
||
sleep ${sleep_min}
|
||
ButtonSwitch ${dict1} //*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), " ")]/following-sibling::div/div el-switch is-checked el-switch
|
||
${fail} Set Variable ${fail1}
|
||
run keyword if "${fail}"=="Fail-close" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[6]/div[5]/div/div/label[1]/span
|
||
... ELSE IF "${fail}"=="Pass-through" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[6]/div[5]/div/div/label[2]/span
|
||
... ELSE log 1111
|
||
${min} Set Variable ${min1}
|
||
${max} Set Variable ${max1}
|
||
run keyword if "${min}"=="TLSv1.0" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min1
|
||
... ELSE IF "${min}"=="TLSv1.1" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min2
|
||
... ELSE IF "${min}"=="TLSv1.2" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min3
|
||
... ELSE IF "${min}"=="TLSv1.3" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min4
|
||
... ELSE IF "${min}"=="SSLv3.0" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_min0
|
||
... ELSE log 错误
|
||
run keyword if "${max}"=="TLSv1.0" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[3]/div/div/div[1]/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max1
|
||
... ELSE IF "${max}"=="TLSv1.1" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max2
|
||
... ELSE IF "${max}"=="TLSv1.2" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max3
|
||
... ELSE IF "${max}"=="TLSv1.3" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max4
|
||
... ELSE IF "${max}"=="SSLv3.0" Run Keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[3]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=pro_max0
|
||
... ELSE log 错误
|
||
click id=decryption-ok
|
||
Wait Until Element Is Enabled id=profilesTabs_Profile_DecryptionProfile ${sleep_Wait}
|
||
Settings-Search ${id-name} ${search} #搜索框的关键字
|
||
${name1} get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span
|
||
Should Be Equal As Strings ${name1} ${name}
|
||
|
||
DecryptionProfileButtonVerification
|
||
[Arguments] ${dict1} ${id-name} ${search} ${xpath1}=//*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), "
|
||
... ${xpath2}=")]/following-sibling::div/div
|
||
... ${open}=el-switch is-checked
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span
|
||
sleep ${sleep_min}
|
||
click id=insertEdit
|
||
sleep ${sleep_min}
|
||
${dict} Set Variable ${dict1}
|
||
FOR ${list} ${key} IN ENUMERATE @{dict}
|
||
${class}= Get Element Attribute xpath=${xpath1}${key}${xpath2} class
|
||
sleep ${sleep_min}
|
||
Should Be Equal As Strings ${class} ${open}
|
||
END
|
||
sleep ${sleep_min}
|
||
click id=decryption-ok
|
||
Wait Until Element Is Enabled id=profilesTabs_Profile_DecryptionProfile ${sleep_Wait}
|
||
Settings-Search ${id-name} ${search}
|
||
|
||
Delete
|
||
sleep ${sleep}
|
||
click id=insertDel
|
||
sleep 3
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep ${sleep}
|
||
|
||
Policy_Verify
|
||
[Arguments] ${Select-Test1} ${APP-ID1} ${Address-type1}=null ${Client-IP1}=null ${Client-Port1}=null ${Server-IP1}=null
|
||
... ${Server-Port1}=null ${Protocol1}=null ${Subscriber-ID1}=null ${dict1}=null
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarTrouble_shooting #点击二级目录Trouble Shooting
|
||
sleep ${sleep}
|
||
click id=Proxy_Profiles_Profile_ResponsePages #点击Policy Verify按钮
|
||
sleep ${sleep_min}
|
||
${Select-Test} Set Variable ${Select-Test1}
|
||
Run Keyword If "${Select-Test}"=="Security Policy Match" Run Keywords click id=SelectPolicy
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=SelectPolicytsg_security0
|
||
... ELSE IF "${Select-Test}"=="Proxy Policy Match" Run Keywords click id=SelectPolicy
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=SelectPolicypxy_manipulation1
|
||
... ELSE log 错误
|
||
${Address-type} Set Variable ${Address-type1}
|
||
Run Keyword If "${Address-type}"=="v4" Run Keywords click id=ip_addrType
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=ip_addrType1
|
||
... ELSE IF "${Address-type}"=="v6" Run Keywords click id=ip_addrType
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=ip_addrType2
|
||
... ELSE log 错误
|
||
${Client-IP} Set Variable ${Client-IP1}
|
||
Run Keyword If "${Client-IP}"=="null" log 默认参数,不输入
|
||
... ELSE input id=clientIp ${Client-IP}
|
||
sleep ${sleep}
|
||
${Client-Port} Set Variable ${Client-Port1}
|
||
Run Keyword If "${Client-Port}"=="null" log 默认参数,不输入
|
||
... ELSE input id=clientPort ${Client-Port}
|
||
sleep ${sleep}
|
||
${Server-IP} Set Variable ${Server-IP1}
|
||
Run Keyword If "${Server-IP}"=="null" log 默认参数,不输入
|
||
... ELSE input id=serverIp ${Server-IP}
|
||
sleep ${sleep}
|
||
${Server-Port} Set Variable ${Server-Port1}
|
||
Run Keyword If "${Server-Port}"=="null" log 默认参数,不输入
|
||
... ELSE input id=ip_serverPort ${Server-Port}
|
||
sleep ${sleep}
|
||
${Protocol} Set Variable ${Protocol1}
|
||
Run Keyword If "${Protocol}"=="Any" Run Keywords click id=ip_protocol
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=ip_protocol0Any
|
||
... ELSE IF "${Protocol}"=="TCP" Run Keywords click id=ip_protocol
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=ip_protocol6TCP
|
||
... ELSE IF "${Protocol}"=="UDP" Run Keywords click id=ip_protocol
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=ip_protocol17UDP
|
||
sleep ${sleep}
|
||
${Subscriber-ID} Set Variable ${Subscriber-ID1}
|
||
Run Keyword If "${Subscriber-ID}"=="null" log 默认参数,不输入
|
||
... ELSE input id=SubscriberID ${Subscriber-ID}
|
||
sleep ${sleep}
|
||
${APP-ID} Set Variable ${APP-ID1}
|
||
Run Keyword If "${Select-Test}"=="Security Policy Match" and "${APP-ID}"=="Protocol-HTTP" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
|
||
... AND sleep ${sleep}
|
||
... AND Policy_Verify_Switch ${APP-ID}
|
||
... AND click id=Protocol-HTTPhttp
|
||
... AND sleep ${sleep}
|
||
... ELSE IF "${Select-Test}"=="Security Policy Match" and "${APP-ID}"=="Protocol-SSL" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
|
||
... AND sleep ${sleep}
|
||
... AND Policy_Verify_Switch ${APP-ID}
|
||
... AND click id=Protocol-SSLssl
|
||
... ELSE IF "${Select-Test}"=="Security Policy Match" and "${APP-ID}"=="Protocol-DNS" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
|
||
... AND sleep ${sleep}
|
||
... AND Policy_Verify_Switch ${APP-ID}
|
||
... AND click id=Protocol-DNSdns
|
||
... ELSE IF "${Select-Test}"=="Security Policy Match" and "${APP-ID}"=="Protocol-MAIL" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
|
||
... AND sleep ${sleep}
|
||
... AND Policy_Verify_Switch ${APP-ID}
|
||
... AND click id=Protocol-MAILmail
|
||
... ELSE IF "${Select-Test}"=="Security Policy Match" and "${APP-ID}"=="Protocol-FTP" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
|
||
... AND sleep ${sleep}
|
||
... AND Policy_Verify_Switch ${APP-ID}
|
||
... AND click id=Protocol-FTPftp
|
||
... ELSE IF "${Select-Test}"=="Proxy Policy Match" and "${APP-ID}"=="Protocol-HTTP" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
|
||
... AND sleep ${sleep}
|
||
... AND Policy_Verify_Switch ${APP-ID}
|
||
... AND click id=Protocol-HTTPhttp
|
||
... ELSE IF "${Select-Test}"=="Proxy Policy Match" and "${APP-ID}"=="Protocol-DoH" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
|
||
... AND sleep ${sleep}
|
||
... AND Policy_Verify_Switch ${APP-ID}
|
||
... AND click id=Protocol-DoHDoH
|
||
... ELSE log 传入参数错误
|
||
${dict} Set Variable ${dict1}
|
||
: FOR ${list} ${key} IN ENUMERATE @{dict}
|
||
\ run keyword if "${key}"=="URL" and "${APP-ID}"=="Protocol-HTTP" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep}
|
||
\ ... AND click id=attributeNameurlURL
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="Host" and "${APP-ID}"=="Protocol-HTTP" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep}
|
||
\ ... AND click id=attributeNamehostHost
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="REQ Body" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNamereq_bodyREQ Body
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="RES Body" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNameres_bodyRES Body
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="REQ HDR" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNamereq_hdrREQ HDR
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND Req_Res_Body ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="RES HDR" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNameres_hdrRES HDR
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND Req_Res_Body ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="SNI" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNamesniSNI
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="SAN" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNamesanSAN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="CN" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNamecnCN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="QNAME" and "${APP-ID}"=="Protocol-DNS" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNameqnameQNAME
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="From" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNamefromFrom
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="To" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNametoTo
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="Account" and "${APP-ID}"=="Protocol-MAIL" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNameaccountAccount
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="Subject" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNamesubjectSubject
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="Content" and "${APP-ID}"=="Protocol-MAIL" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNamecontentContent
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="ATT Name" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNameatt_nameATT Name
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="ATT CONT" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNameatt_contentATT CONT
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="URL" and "${APP-ID}"=="Protocol-FTP" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNameurlURL
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="Content" and "${APP-ID}"=="Protocol-FTP" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNamecontentContent
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="Account" and "${APP-ID}"=="Protocol-FTP" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNameaccountAccount
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="QNAME" and "${APP-ID}"=="Protocol-DoH" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNameqnameQNAME
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
\ run keyword if "${key}"=="Host" and "${APP-ID}"=="Protocol-DoH" Run Keywords click id=selectAppidBTN
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeName
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeNamehostHost
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ ... AND sleep ${sleep_min}
|
||
sleep ${sleep}
|
||
click id=verify-ok
|
||
sleep ${sleep}
|
||
${State} get text xpath=//*[@id="app"]/div/div[3]/div/div/div[3]/div[1]/div[2]/div/div[2]/div[2]/ul/li[2]/span[3]
|
||
sleep ${sleep}
|
||
Should Be Equal As Strings ${State} Execute #断言
|
||
|
||
Req_Res_Body
|
||
[Arguments] ${dict1}
|
||
${dict} Set Variable ${dict1}
|
||
: FOR ${list} ${key} IN ENUMERATE @{dict}
|
||
\ run keyword if "${key}"=="User Agent" Run Keywords click id=attributeValue_district
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeValue_districtUser-AgentUser Agent
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ run keyword if "${key}"=="Cookie" Run Keywords click id=attributeValue_district
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeValue_districtCookieCookie
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ run keyword if "${key}"=="Set-Cookie" Run Keywords click id=attributeValue_district
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeValue_districtSet-CookieSet-Cookie
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
\ run keyword if "${key}"=="Content-Type" Run Keywords click id=attributeValue_district
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND click id=attributeValue_districtContent-TypeContent-Type
|
||
\ ... AND sleep ${sleep_min}
|
||
\ ... AND input id=attributeValue_string ${dict}[${key}]
|
||
|
||
CreateIpLibraries
|
||
[Arguments] ${type1} ${type} ${Continent/Country} ${GeoNameID} ${City} ${ip} ${j}=1 ${Country}=null ${Longitude}=null ${Latitude}=null
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarAdvanced
|
||
sleep ${sleep_min}
|
||
click id=Advanced/ipLibrary #点击二级目录IP_Libraries
|
||
sleep ${sleep}
|
||
click id=tagAdd #点击Create按钮
|
||
sleep ${sleep}
|
||
run keyword if "${type}"=="Country" Run Keywords click id=security_action_country
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=ip_geography_continent
|
||
... AND sleep ${sleep_min}
|
||
... AND Switch_Geographic_Locations ${Continent/Country}
|
||
... AND input id=ip_geography_Country1 ${Country}
|
||
run keyword if "${type}"=="City" Run Keywords click id=security_action_city
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=ip_geography_Country
|
||
... AND sleep ${sleep_min}
|
||
... AND Switch_Geographic_Locations ${Continent/Country}
|
||
sleep ${sleep_min}
|
||
input id=ip_geography_name ${GeoNameID}
|
||
sleep ${sleep_min}
|
||
input id=ip_geography_City ${City}
|
||
sleep ${sleep_min}
|
||
click id=ip_geography_IPRange
|
||
sleep ${sleep_min}
|
||
input id=ip_input0 ${ip}[0]
|
||
sleep ${sleep_min}
|
||
run keyword if "${j}"!="1" Ip_Range_Create ${j} ${ip}
|
||
run keyword if "${Longitude}"!="null" Run Keywords input id=ip_geography_longitude ${Longitude}
|
||
... AND sleep ${sleep_min}
|
||
run keyword if "${Latitude}"!="null" Run Keywords input id=ip_geography_latitude ${Latitude}
|
||
... AND sleep ${sleep_min}
|
||
click id=IP_library_add
|
||
Wait Until Element Is Enabled xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div ${sleep_Wait}
|
||
#验证新建是否成功
|
||
Switch_IP_Libraries ${type1} ${GeoNameID} ${GeoNameID}
|
||
${GeoNameText} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
|
||
sleep ${sleep}
|
||
Should Be Equal As Strings ${GeoNameText} ${GeoNameID} #断言
|
||
|
||
EditIpLibraries
|
||
[Arguments] ${type} ${GeoNameID} ${City}=null ${ip}=null ${j}=1 ${Country}=null ${Longitude}=null ${Latitude}=null ${type1}=null ${type2}=null
|
||
click id=tagEdit #点击Edit按钮
|
||
sleep ${sleep}
|
||
run keyword if "${City}"!="null" input id=ip_geography_City ${City}
|
||
sleep ${sleep_min}
|
||
run keyword if "${type1}"=="edit" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[2]/form/div[3]/div/div[2]/div[2]/ul/li/div[2]/i[1]
|
||
... AND sleep ${sleep_min}
|
||
... AND clear element text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[2]/form/div[3]/div/div[2]/div[2]/ul/li/div[1]/form/div/div/div
|
||
... AND sleep ${sleep_min}
|
||
... AND input id=ip_input0 ${ip}[0]
|
||
... AND sleep ${sleep_min}
|
||
run keyword if "${type1}"=="create" Ip_Range_Edit_Create ${j} ${ip}
|
||
sleep ${sleep_min}
|
||
run keyword if "${type1}"=="delete" and "${type2}"=="create" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[2]/form/div[3]/div/div[2]/div[2]/ul/li/div[2]/i[2]
|
||
... AND sleep ${sleep_min}
|
||
... AND Ip_Range_Edit_Create ${j} ${ip}
|
||
run keyword if "${type1}"=="null" log 不做更改
|
||
run keyword if "${Longitude}"!="null" Run Keywords input id=ip_geography_longitude ${Longitude}
|
||
... AND sleep ${sleep_min}
|
||
run keyword if "${Latitude}"!="null" Run Keywords input id=ip_geography_latitude ${Latitude}
|
||
... AND sleep ${sleep_min}
|
||
click id=IP_library_add
|
||
Wait Until Element Is Enabled xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div ${sleep_Wait}
|
||
#验证修改是否成功
|
||
Switch_IP_Libraries ${type} ${GeoNameID} ${GeoNameID}
|
||
${GeoNameText} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
|
||
sleep ${sleep}
|
||
Should Be Equal As Strings ${GeoNameText} ${GeoNameID} #断言
|
||
|
||
CreateIpLibrariesErrorVerification
|
||
[Arguments] ${type1} ${type} ${Continent/Country} ${GeoNameID} ${City} ${ip} ${AssertPath} ${AssertText} ${j}=1 ${Country}=null ${Longitude}=null ${Latitude}=null
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=sidebarAdvanced
|
||
sleep ${sleep_min}
|
||
click id=Advanced/ipLibrary #点击二级目录IP_Libraries
|
||
sleep ${sleep}
|
||
click id=tagAdd #点击Create按钮
|
||
sleep ${sleep}
|
||
run keyword if "${type}"=="Country" Run Keywords click id=security_action_country
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=ip_geography_continent
|
||
... AND sleep ${sleep_min}
|
||
... AND Switch_Geographic_Locations ${Continent/Country}
|
||
... AND input id=ip_geography_Country1 ${Country}
|
||
run keyword if "${type}"=="City" Run Keywords click id=security_action_city
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=ip_geography_Country
|
||
... AND sleep ${sleep_min}
|
||
... AND Switch_Geographic_Locations ${Continent/Country}
|
||
sleep ${sleep_min}
|
||
input id=ip_geography_name ${GeoNameID}
|
||
sleep ${sleep_min}
|
||
input id=ip_geography_City ${City}
|
||
sleep ${sleep_min}
|
||
click id=ip_geography_IPRange
|
||
sleep ${sleep_min}
|
||
input id=ip_input0 ${ip}[0]
|
||
sleep ${sleep_min}
|
||
run keyword if "${j}"!="1" Ip_Range_Create ${j} ${ip}
|
||
run keyword if "${Longitude}"!="null" Run Keywords input id=ip_geography_longitude ${Longitude}
|
||
... AND sleep ${sleep_min}
|
||
run keyword if "${Latitude}"!="null" Run Keywords input id=ip_geography_latitude ${Latitude}
|
||
... AND sleep ${sleep_min}
|
||
click id=IP_library_add
|
||
sleep ${sleep}
|
||
${text} get text xpath=${AssertPath}
|
||
Should Be Equal As Strings ${text} ${AssertText}
|
||
|
||
SystemUsagePolicyVerification
|
||
[Arguments] ${type} ${DisabledOREnabled}
|
||
[Documentation]
|
||
... ${type}:查询的字段 格式:(Proxy/Security/WANNAT/ProxyTCPOptions)_(Disabled/Enabled)
|
||
click id=Advanced/storageQuota #点击System Usage
|
||
sleep ${sleep_min}
|
||
${text1}= SystemUsageChart ${type}
|
||
click id=Advanced/storageQuota
|
||
sleep ${sleep_min}
|
||
${text2}= SystemUsageText ${type}
|
||
sleep ${sleep_min}
|
||
${text3}= SystemUsagePolicySQLVerification ${type} ${DisabledOREnabled}
|
||
sleep ${sleep_min}
|
||
Should Be Equal As Strings ${text1} ${text2}
|
||
Should Be Equal As Strings ${text2} ${text3}
|
||
|
||
SystemUsageObjectsVerification
|
||
[Arguments] ${type}
|
||
[Documentation]
|
||
... ${type}:查询的字段 格式:(Proxy/Security/WANNAT/ProxyTCPOptions)_(Disabled/Enabled)
|
||
click id=Advanced/storageQuota #点击System Usage
|
||
sleep ${sleep_min}
|
||
${text1}= SystemUsageChart ${type}
|
||
click id=Advanced/storageQuota
|
||
sleep ${sleep_min}
|
||
${text2}= SystemUsageText ${type}
|
||
${text3}= SystemUsageObjectsSQLVerification ${type}
|
||
Should Be Equal As Strings ${text1} ${text2}
|
||
Should Be Equal As Strings ${text2} ${text3}
|
||
|
||
SystemUsageChart
|
||
[Arguments] ${type}
|
||
${ChartSuspension} Set Variable if "${type}"=="Proxy_Disabled" or "${type}"=="Proxy_Enabled" //*[@id="settings_storage"]/div[1]/div[2]/div[1]/div/div/div[2]/div[1] #为图上悬浮定位变量赋值
|
||
... "${type}"=="Security_Disabled" or "${type}"=="Security_Enabled" //*[@id="settings_storage"]/div[1]/div[2]/div[1]/div/div/div[2]/div[2]
|
||
... "${type}"=="WANNAT_Disabled" or "${type}"=="WANNAT_Enabled" //*[@id="settings_storage"]/div[1]/div[2]/div[1]/div/div/div[2]/div[3]
|
||
... "${type}"=="ProxyTCPOptions_Disabled" or "${type}"=="ProxyTCPOptions_Enabled" //*[@id="settings_storage"]/div[1]/div[2]/div[1]/div/div/div[2]/div[4]
|
||
... "${type}"=="Accounts_Items" or "${type}"=="Accounts_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[1]
|
||
... "${type}"=="FQDNs_Items" or "${type}"=="FQDNs_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[2]
|
||
... "${type}"=="HTTPSignatures_Items" or "${type}"=="HTTPSignatures_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[3] #定位不到
|
||
... "${type}"=="Keywords_Items" or "${type}"=="Keywords_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[4]
|
||
... "${type}"=="SubscriberIDs_Items" or "${type}"=="SubscriberIDs_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[5] #定位不到4、5、6URL
|
||
... "${type}"=="URLs_Items" or "${type}"=="URLs_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[6]
|
||
... "${type}"=="IPAddresses_IPV4_Items" or "${type}"=="IPAddresses_IPV6_Items" or "${type}"=="IPAddresses_IP_Objects" or "${type}"=="IPAddresses_Geography_Items" or "${type}"=="IPAddresses_Geography_Objects" or "${type}"=="IPAddresses_IPLearning_Items(IPv4)" or "${type}"=="IPAddresses_IPLearning_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[7]
|
||
... "${type}"=="Applications_Items" or "${type}"=="Applications_Objects" or "${type}"=="Applications_Groups_Objects" or "${type}"=="Applications_Groups_Items" or "${type}"=="Applications_Selectors_Objects" or "${type}"=="Applications_Selectors_Items" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[2]/div[8]
|
||
sleep ${sleep_min}
|
||
${ChartValueXpath}= SystemUsageGetText ${type}
|
||
Mouse Over xpath=${ChartSuspension}
|
||
sleep ${sleep}
|
||
# Wait Until Element Is Enabled xpath=/html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span 10
|
||
${text1} get text xpath=${ChartValueXpath} #获取图表上的值
|
||
[Return] ${text1}
|
||
|
||
SystemUsageText
|
||
[Arguments] ${type}
|
||
${TextSuspension} Set Variable if "${type}"=="Proxy_Disabled" or "${type}"=="Proxy_Enabled" //*[@id="settings_storage"]/div[1]/div[2]/div[1]/div/div/div[3]/div[1]/span/div/div[2] #在文本统计悬浮定位变量赋值
|
||
... "${type}"=="Security_Disabled" or "${type}"=="Security_Enabled" //*[@id="settings_storage"]/div[1]/div[2]/div[1]/div/div/div[3]/div[2]
|
||
... "${type}"=="WANNAT_Disabled" or "${type}"=="WANNAT_Enabled" //*[@id="settings_storage"]/div[1]/div[2]/div[1]/div/div/div[3]/div[3]
|
||
... "${type}"=="ProxyTCPOptions_Disabled" or "${type}"=="ProxyTCPOptions_Enabled" //*[@id="settings_storage"]/div[1]/div[2]/div[1]/div/div/div[3]/div[4]
|
||
... "${type}"=="Accounts_Items" or "${type}"=="Accounts_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[3]/div[1]
|
||
... "${type}"=="FQDNs_Items" or "${type}"=="FQDNs_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[3]/div[2]
|
||
... "${type}"=="HTTPSignatures_Items" or "${type}"=="HTTPSignatures_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[3]/div[3]
|
||
... "${type}"=="Keywords_Items" or "${type}"=="Keywords_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[3]/div[4]
|
||
... "${type}"=="SubscriberIDs_Items" or "${type}"=="SubscriberIDs_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[3]/div[5]
|
||
... "${type}"=="URLs_Items" or "${type}"=="URLs_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[3]/div[6]
|
||
... "${type}"=="IPAddresses_IPV4_Items" or "${type}"=="IPAddresses_IPV6_Items" or "${type}"=="IPAddresses_IP_Objects" or "${type}"=="IPAddresses_Geography_Items" or "${type}"=="IPAddresses_Geography_Objects" or "${type}"=="IPAddresses_IPLearning_Items(IPv4)" or "${type}"=="IPAddresses_IPLearning_Objects" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[3]/div[7]
|
||
... "${type}"=="Applications_Items" or "${type}"=="Applications_Objects" or "${type}"=="Applications_Groups_Objects" or "${type}"=="Applications_Groups_Items" or "${type}"=="Applications_Selectors_Objects" or "${type}"=="Applications_Selectors_Items" //*[@id="settings_storage"]/div[1]/div[2]/div[2]/div/div/div[3]/div[8]
|
||
sleep ${sleep_min}
|
||
${TextValueXpath}= SystemUsageGetText ${type}
|
||
Mouse Over xpath=${TextSuspension}
|
||
sleep ${sleep}
|
||
# Wait Until Element Is Enabled xpath=/html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span 10
|
||
${text2} get text xpath=${TextValueXpath}
|
||
[Return] ${text2}
|
||
|
||
SystemUsagePolicySQLVerification
|
||
[Arguments] ${type} ${DisabledOREnabled}
|
||
click id=Advanced/storageQuota #点击System Usage
|
||
sleep ${sleep_min}
|
||
${DisabledOREnabled} Set Variable if "${DisabledOREnabled}"=="Disabled" 0 1
|
||
${SQL} Set Variable if "${type}"=="Proxy_Disabled" or "${type}"=="Proxy_Enabled" pxy_ctrl_compile
|
||
... "${type}"=="Security_Disabled" or "${type}"=="Security_Enabled" tsg_security_compile
|
||
... "${type}"=="WANNAT_Disabled" or "${type}"=="WANNAT_Enabled" wannat_compile
|
||
... "${type}"=="ProxyTCPOptions_Disabled" or "${type}"=="ProxyTCPOptions_Enabled" pxy_tcp_option_compile
|
||
Connect To Database Using Custom Params pymysql ${mysqlHost}
|
||
${text1} query SELECT count(*) FROM ${SQL} WHERE is_initialize !=1 And is_valid=${DisabledOREnabled}
|
||
${text1} Set Variable ${text1[0][0]}
|
||
Disconnect From Database
|
||
${a} Set Variable ${1}
|
||
${text2} Evaluate ${text1}+${a}
|
||
${text1} Set Variable if "${type}"=="Security_Enabled" or "${type}"=="ProxyTCPOptions_Enabled" ${text2} ${text1}
|
||
[Return] ${text1}
|
||
|
||
SystemUsageObjectsSQLVerification
|
||
[Arguments] ${type}
|
||
[Documentation]
|
||
... ${type}:验证的类型
|
||
${SQL} Set Variable if "${type}"=="Accounts_Items" select count(*) from tsg_obj_account where is_initialize !=1
|
||
... "${type}"=="Accounts_Objects" select count(*) from policy_object where group_type='account' and is_initialize !=1
|
||
... "${type}"=="FQDNs_Items" SELECT count(*) from tsg_obj_fqdn where is_initialize !=1 and group_id !=1
|
||
... "${type}"=="FQDNs_Objects" select count(*) from policy_object where group_type = 'fqdn' and is_initialize !=1
|
||
... "${type}"=="HTTPSignatures_Items" select count(*) from tsg_obj_http_signature where is_initialize !=1
|
||
... "${type}"=="HTTPSignatures_Objects" select count(*) from policy_object where group_type = 'http_signature' and is_initialize !=1
|
||
... "${type}"=="Keywords_Items" select count(*) from tsg_obj_keywords where is_initialize !=1
|
||
... "${type}"=="Keywords_Objects" select count(*) from policy_object where group_type = 'keywords' and is_initialize !=1
|
||
... "${type}"=="SubscriberIDs_Items" select count(*) from tsg_obj_subscriber_id where is_initialize !=1
|
||
... "${type}"=="SubscriberIDs_Objects" select count(*) from policy_object where group_type = 'subscriberid' and is_initialize !=1
|
||
... "${type}"=="URLs_Items" select count(*) from tsg_obj_url where is_initialize !=1
|
||
... "${type}"=="URLs_Objects" select count(*) from policy_object where group_type = 'url' and is_initialize !=1
|
||
... "${type}"=="IPAddresses_IPV4_Items" select count(*) from tsg_obj_ip_addr where is_initialize !=1 and addr_type =4
|
||
... "${type}"=="IPAddresses_IPV6_Items" select count(*) from tsg_obj_ip_addr where is_initialize !=1 and addr_type =6
|
||
... "${type}"=="IPAddresses_IP_Objects" select count(*) from policy_object where group_type = 'ip' and is_initialize !=1 and group_sub_type = 'endpoint'
|
||
... "${type}"=="IPAddresses_Geography_Items" SELECT count(*) from tsg_obj_geo_location where is_initialize !=1
|
||
... "${type}"=="IPAddresses_Geography_Objects" select count(*) from policy_object where group_type = 'ip' and is_initialize !=1 and group_sub_type = 'geo_location'
|
||
... "${type}"=="IPAddresses_IPLearning_Items(IPv4)" select count(*) from tsg_obj_ip_learning_addr where is_initialize !=1
|
||
... "${type}"=="IPAddresses_IPLearning_Objects" select count(*) from policy_object where group_type = 'ip' and is_initialize !=1 and group_sub_type = 'ip_learning'
|
||
... "${type}"=="Applications_Items" select count(*) from tsg_obj_app_id where is_initialize !=1 and is_valid = 1
|
||
... "${type}"=="Applications_Objects" select count(*) from policy_object where group_type = 'app_id' and is_initialize !=1 and group_member_type = 1
|
||
... "${type}"=="Applications_Groups_Objects" select count(*) from policy_object where group_type = 'app_id' and is_initialize !=1 and group_member_type != 1
|
||
... "${type}"=="Applications_Groups_Items" select count(*) from tsg_obj_app_id where is_initialize !=1 and is_valid != 1
|
||
... "${type}"=="Applications_Selectors_Objects" or "${type}"=="Applications_Selectors_Items" select count(*) from app_selector_compile
|
||
Connect To Database Using Custom Params pymysql ${mysqlHost}
|
||
${text} query ${SQL}
|
||
${text} Set Variable ${text[0][0]}
|
||
Disconnect From Database
|
||
[Return] ${text}
|
||
|
||
SystemUsageGetText
|
||
[Arguments] ${type}
|
||
${TextValueXpath} Set Variable if "${type}"=="Proxy_Disabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span #在文本统计获取Value定位变量赋值
|
||
... "${type}"=="Proxy_Enabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span
|
||
... "${type}"=="Security_Disabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span
|
||
... "${type}"=="Security_Enabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span
|
||
... "${type}"=="WANNAT_Disabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span
|
||
... "${type}"=="WANNAT_Enabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span
|
||
... "${type}"=="ProxyTCPOptions_Disabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span
|
||
... "${type}"=="ProxyTCPOptions_Enabled" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span
|
||
... "${type}"=="Accounts_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span
|
||
... "${type}"=="Accounts_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span
|
||
... "${type}"=="FQDNs_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span
|
||
... "${type}"=="FQDNs_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span
|
||
... "${type}"=="HTTPSignatures_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span
|
||
... "${type}"=="HTTPSignatures_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span
|
||
... "${type}"=="Keywords_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span
|
||
... "${type}"=="Keywords_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span
|
||
... "${type}"=="SubscriberIDs_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span
|
||
... "${type}"=="SubscriberIDs_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span
|
||
... "${type}"=="URLs_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[1]/td[2]/div/span
|
||
... "${type}"=="URLs_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span
|
||
... "${type}"=="IPAddresses_IPV4_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[3]/td[2]/div/span
|
||
... "${type}"=="IPAddresses_IPV6_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[4]/td[2]/div/span
|
||
... "${type}"=="IPAddresses_IP_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span
|
||
... "${type}"=="IPAddresses_Geography_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[7]/td[2]/div/span
|
||
... "${type}"=="IPAddresses_Geography_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[6]/td[2]/div/span
|
||
... "${type}"=="IPAddresses_IPLearning_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[9]/td[2]/div/span
|
||
... "${type}"=="IPAddresses_IPLearning_Items(IPv4)" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[10]/td[2]/div/span
|
||
... "${type}"=="Applications_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[2]/td[2]/div/span
|
||
... "${type}"=="Applications_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[3]/td[2]/div/span
|
||
... "${type}"=="Applications_Groups_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[5]/td[2]/div/span
|
||
... "${type}"=="Applications_Groups_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[6]/td[2]/div/span
|
||
... "${type}"=="Applications_Selectors_Objects" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[8]/td[2]/div/span
|
||
... "${type}"=="Applications_Selectors_Items" /html/body/div[last()]/div[1]/div/div/div[2]/table/tbody/tr[9]/td[2]/div/span
|
||
[Return] ${TextValueXpath}
|
||
|
||
CreatePacketCapture
|
||
[Arguments] ${name} ${AddressType} ${ClientIP} ${Protocol} ${EffectiveDevices} ${CapturedNumber} ${CaptureDuration} ${ClientPort}=null ${ServerIP}=null ${ServerPort}=null
|
||
[Documentation]
|
||
... ${name}:name
|
||
... ${AddressType}:IPV4 or IPV6
|
||
... ${ClientIP}:客户端IP
|
||
... ${Protocol}:协议
|
||
... ${EffectiveDevices}:生效范围
|
||
... ${CapturedNumber}:最大捕包数
|
||
... ${CaptureDuration}:捕包时长
|
||
... ${ClientPort}:客户端端口 默认为空
|
||
... ${ServerIP}:服务器 IP 默认为空
|
||
... ${ServerPort}:服务器端口 默认为空
|
||
sleep ${sleep_min}
|
||
OpenPages sidebarTrouble_shooting Proxy_Profiles_Profile_Insert
|
||
click id=packet_create
|
||
sleep ${sleep}
|
||
input id=PacketCaptureadd_name ${name}
|
||
sleep ${sleep_min}
|
||
run keyword if "${AddressType}"=="IPV6" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=select_addrtype1
|
||
... AND sleep ${sleep_min}
|
||
input id=PacketCaptureadd_cliIp ${ClientIP}
|
||
sleep ${sleep_min}
|
||
run keyword if "${ClientPort}"!="null" run keywords sleep ${sleep_min}
|
||
... AND input id=PacketCaptureadd_cliPort ${ClientPort}
|
||
... AND sleep ${sleep_min}
|
||
... ELSE log ClientPort不输入
|
||
run keyword if "${ServerIP}"!="null" run keywords sleep ${sleep_min}
|
||
... AND input id=PacketCaptureadd_serIp ${ServerIP}
|
||
... AND sleep ${sleep_min}
|
||
... ELSE log ServerIP不输入
|
||
run keyword if "${ServerPort}"!="null" run keywords sleep ${sleep_min}
|
||
... AND input id=PacketCaptureadd_serPort ${ServerPort}
|
||
... AND sleep ${sleep_min}
|
||
... ELSE log ServerPort不输入
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[7]/div/div/div/span/span/i
|
||
sleep ${sleep_min}
|
||
run keyword if "${Protocol}"=="TCP" run keywords sleep ${sleep_min}
|
||
... AND click id=select_Protocol0
|
||
... ELSE IF "${Protocol}"=="UDP" run keywords sleep ${sleep_min}
|
||
... AND click id=select_Protocol1
|
||
... ELSE IF "${Protocol}"=="Any" run keywords sleep ${sleep_min}
|
||
... AND click id=select_Protocol2
|
||
sleep ${sleep_min}
|
||
PacketCaptureEffectiveDevices ${EffectiveDevices}
|
||
input id=PacketCaptureadd_MaxPacketCapNum ${CapturedNumber}
|
||
sleep ${sleep_min}
|
||
input id=PacketCaptureadd_pcapStorageDay ${CaptureDuration}
|
||
sleep ${sleep_min}
|
||
click id=packetCaptureAdd_ok
|
||
Wait Until Element Is Enabled xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] ${sleep_Wait}
|
||
Settings-search ${name} name
|
||
sleep ${sleep_min}
|
||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[4]/div/div/div/p/span
|
||
Should Be Equal As Strings ${text} ${name}
|
||
|
||
EditPacketCapture
|
||
[Arguments] ${name} ${AddressType} ${ClientIP} ${Protocol} ${EffectiveDevices} ${CapturedNumber} ${CaptureDuration} ${ClientPort}=null ${ServerIP}=null ${ServerPort}=null
|
||
[Documentation]
|
||
... ${name}:name
|
||
... ${AddressType}:IPV4 or IPV6
|
||
... ${ClientIP}:客户端IP
|
||
... ${Protocol}:协议
|
||
... ${EffectiveDevices}:生效范围
|
||
... ${CapturedNumber}:最大捕包数
|
||
... ${CaptureDuration}:捕包时长
|
||
... ${ClientPort}:客户端端口 默认为空
|
||
... ${ServerIP}:服务器 IP 默认为空
|
||
... ${ServerPort}:服务器端口 默认为空
|
||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
|
||
sleep ${sleep_min}
|
||
click id=packet_edit
|
||
sleep ${sleep}
|
||
input id=PacketCaptureadd_name ${name}
|
||
sleep ${sleep_min}
|
||
run keyword if "${AddressType}"=="IPV6" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[2]/div/div/div/span/span/i
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=select_addrtype1
|
||
... AND sleep ${sleep_min}
|
||
input id=PacketCaptureadd_cliIp ${ClientIP}
|
||
sleep ${sleep_min}
|
||
run keyword if "${ClientPort}"!="null" run keywords sleep ${sleep_min}
|
||
... AND Clear Element Text id=PacketCaptureadd_cliPort
|
||
... AND sleep ${sleep_min}
|
||
... AND input id=PacketCaptureadd_cliPort ${ClientPort}
|
||
... AND sleep ${sleep_min}
|
||
... ELSE log ClientPort不输入
|
||
run keyword if "${ServerIP}"!="null" run keywords sleep ${sleep_min}
|
||
... AND input id=PacketCaptureadd_serIp ${ServerIP}
|
||
... AND sleep ${sleep_min}
|
||
... ELSE log ServerIP不输入
|
||
run keyword if "${ServerPort}"!="null" run keywords sleep ${sleep_min}
|
||
... AND Clear Element Text id=PacketCaptureadd_serPort
|
||
... AND sleep ${sleep_min}
|
||
... AND input id=PacketCaptureadd_serPort ${ServerPort}
|
||
... AND sleep ${sleep_min}
|
||
... ELSE log ServerPort不输入
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[7]/div/div/div/span/span/i
|
||
sleep ${sleep_min}
|
||
run keyword if "${Protocol}"=="TCP" run keywords sleep ${sleep_min}
|
||
... AND click id=select_Protocol0
|
||
... ELSE IF "${Protocol}"=="UDP" run keywords sleep ${sleep_min}
|
||
... AND click id=select_Protocol1
|
||
... ELSE IF "${Protocol}"=="Any" run keywords sleep ${sleep_min}
|
||
... AND click id=select_Protocol2
|
||
sleep ${sleep_min}
|
||
click id=packetCaptureAdd_effremove
|
||
sleep ${sleep_min}
|
||
PacketCaptureEffectiveDevices ${EffectiveDevices}
|
||
input id=PacketCaptureadd_MaxPacketCapNum ${CapturedNumber}
|
||
sleep ${sleep_min}
|
||
input id=PacketCaptureadd_pcapStorageDay ${CaptureDuration}
|
||
sleep ${sleep_min}
|
||
click id=packetCaptureAdd_ok
|
||
Wait Until Element Is Enabled xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] ${sleep_Wait}
|
||
Settings-search ${name} name
|
||
sleep ${sleep}
|
||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[4]/div/div/div/p/span
|
||
Should Be Equal As Strings ${text} ${name}
|
||
|
||
PacketCaptureEffectiveDevices
|
||
[Arguments] ${EffectiveDevices}
|
||
click id=PacketCaptureadd_EDevice
|
||
sleep ${sleep_min}
|
||
run keyword if "${EffectiveDevices}"=="Nur-sultan" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[1]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Aktau" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[2]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Aktubinsk" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[3]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Almaty" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[4]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Atyrau" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[5]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Karaganda" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[6]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Kokshetau" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[7]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Kostanay" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[8]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Kyzylorda" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[9]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Pavlodar" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[10]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Petropavl" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[11]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Semey" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[12]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Shymkent" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[13]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Taldykurgan" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[14]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Taraz" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[15]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Uralsk" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[16]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Ust-Kamenogorsk" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[17]/div[1]/label/span/span
|
||
... ELSE IF "${EffectiveDevices}"=="Zhezkazgan" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="policy_Manipulation_create4"]/div/div[2]/div/div/div/div[1]/div/div/div[18]/div[1]/label/span/span
|
||
sleep ${sleep_min}
|
||
click id=proxyManipulationConditionsAreaSuccess
|
||
sleep ${sleep_min}
|
||
|
||
|
||
|
||
PacketCaptureSerch
|
||
[Arguments] ${status}
|
||
sleep ${sleep_min}
|
||
click 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 ${sleep_min}
|
||
click xpath=/html/body/div/div[1]/div[1]/ul/li[6]
|
||
sleep ${sleep_min}
|
||
run keyword if "${status}"=="Effective" run keywords sleep ${sleep_min}
|
||
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[1]/span
|
||
... ELSE IF "${status}"=="Invalid" run keywords sleep ${sleep_min}
|
||
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[2]/span
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/i
|
||
|
||
|
||
Switch_Geographic_Locations
|
||
[Arguments] ${Continent/Country}
|
||
sleep ${sleep_min}
|
||
input id=objectName_seach ${Continent/Country}
|
||
sleep ${sleep_min}
|
||
press keys id=objectName_seach ENTER
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="right_locationList"]/div[2]/div[1]/div[2]/div/div
|
||
sleep ${sleep_min}
|
||
click id=interceptionadd_allcancelobject9
|
||
sleep ${sleep_min}
|
||
|
||
Ip_Range_Create
|
||
[Arguments] ${j} ${ip}
|
||
sleep ${sleep_min}
|
||
: FOR ${i} IN RANGE 1 ${j}
|
||
\ sleep ${sleep_min}
|
||
\ click id=addIPList
|
||
\ sleep ${sleep_min}
|
||
\ input id=ip_input${i} ${ip}[${i}]
|
||
\ sleep ${sleep_min}
|
||
Ip_Range_Edit_Create
|
||
[Arguments] ${j} ${ip}
|
||
sleep ${sleep_min}
|
||
: FOR ${i} IN RANGE ${j}
|
||
\ sleep ${sleep_min}
|
||
\ click id=addIPList
|
||
\ sleep ${sleep_min}
|
||
\ input id=ip_input${i} ${ip}[${i}]
|
||
\ sleep ${sleep_min}
|
||
sleep ${sleep_min}
|
||
|
||
DeleteIPLibraries
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
|
||
sleep ${sleep}
|
||
click id=tagDel
|
||
sleep ${sleep}
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep ${sleep}
|
||
|
||
Switch_IP_Libraries
|
||
[Arguments] ${type} ${value} ${GeoName}
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span/div/div/div[2]/div/div/div/input
|
||
sleep ${sleep}
|
||
run keyword if "${type}"=="Geo Name" Run Keywords click xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
||
... AND sleep ${sleep_min}
|
||
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
|
||
run keyword if "${type}"=="Country and Region" Run Keywords click xpath=/html/body/div/div[1]/div[1]/ul/li[3]
|
||
... AND sleep ${sleep_min}
|
||
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
|
||
run keyword if "${type}"=="City" Run Keywords click xpath=/html/body/div/div[1]/div[1]/ul/li[4]
|
||
... AND sleep ${sleep_min}
|
||
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
|
||
run keyword if "${type}"=="Operator" Run Keywords click xpath=/html/body/div/div[1]/div[1]/ul/li[5]
|
||
... AND sleep ${sleep_min}
|
||
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
|
||
... AND sleep ${sleep_min}
|
||
... AND click xpath=/html/body/div[2]/div[1]/div[1]/ul/li[1]
|
||
sleep ${sleep_min}
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span/div/i
|
||
sleep ${sleep_min}
|
||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
|
||
sleep ${sleep_min}
|
||
${GeoNameText} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/div
|
||
sleep ${sleep}
|
||
Should Be Equal As Strings ${GeoNameText} ${GeoName} #断言
|
||
|
||
OpenPages
|
||
[Arguments] ${SecondaryMenu} ${Three-levelMenu} ${Targeting}=null
|
||
[Documentation]
|
||
... ${SecondaryMenu}:二级菜单
|
||
... ${Three-levelMenu}:三级菜单
|
||
... ${Targeting} :三级菜单 定位方式 默认不输入为id
|
||
click id=children6
|
||
sleep ${sleep_min}
|
||
click id=${SecondaryMenu}
|
||
sleep ${sleep_min}
|
||
run keyword if "${Targeting}"=="null" run keywords sleep ${sleep_min}
|
||
... AND click id=${Three-levelMenu}
|
||
run keyword if "${Targeting}"=="xpath" run keywords sleep ${sleep_min}
|
||
... AND click ${Targeting}=${Three-levelMenu}
|
||
sleep ${sleep}
|
||
|
||
TurnPage
|
||
[Arguments] ${NextPage} ${PreviousPage} ${JumpInput} ${pages} ${AssertXpath} ${lastpage}=null ${lastxpath}=null
|
||
[Documentation]
|
||
... ${NextPage} 下一页按钮定位
|
||
... ${PreviousPage} 上一页按钮定位
|
||
... ${JumpInput} 跳转页面输入框
|
||
... ${pages} 跳转得页码
|
||
sleep ${sleep}
|
||
${text1} get text xpath=${AssertXpath}
|
||
click xpath=${NextPage}
|
||
sleep ${sleep}
|
||
${text2} get text xpath=${AssertXpath}
|
||
click xpath=${PreviousPage}
|
||
sleep ${sleep}
|
||
${text3} get text xpath=${AssertXpath}
|
||
Clear Element Text xpath=${JumpInput}
|
||
sleep ${sleep}
|
||
input text xpath=${JumpInput} ${pages}
|
||
sleep ${sleep}
|
||
press keys xpath=${JumpInput} ENTER
|
||
sleep ${sleep}
|
||
${text4} get text xpath=${AssertXpath}
|
||
run keyword if "${lastpage}" == "null" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[last()]/div/ul/li[last()]
|
||
... ELSE click xpath=${lastxpath}
|
||
sleep ${sleep}
|
||
${text5} get text xpath=${AssertXpath}
|
||
Should Not Be Equal ${text1} ${text2}
|
||
Should Not Be Equal ${text3} ${text2}
|
||
Should Not Be Equal ${text3} ${text4}
|
||
Should Not Be Equal ${text1} ${text5}
|
||
|
||
PagingDisplay
|
||
[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[3]/div[1]/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[3]/div/div/div[last()]/div/span[1]
|
||
sleep ${sleep_min}
|
||
${Quantity} StringSegmentation ${text} 6
|
||
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[3]/div/div/div[last()]/div/ul/li[last()]
|
||
Should Be Equal As Strings ${text} ${Page}
|
||
|
||
PagingDisplay_Second
|
||
[Arguments] ${Number}
|
||
[Documentation]
|
||
... ${Number}: 设置页面显示数据条数 (20、5、30、50、100)
|
||
... ${last} 次关键字 当最后一页定位和其他页面不同时,传入非null的值
|
||
... ${lastxpath} 当最后一页定位和其他页面不同时,传入最后一页的xpath 定位
|
||
Mouse Over xpath=//*[@id="ly-table1-listcontent"]/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="ly-table1-listcontent"]/div[2]/div/div/span[1]
|
||
sleep ${sleep_min}
|
||
${Quantity} StringSegmentation ${text} 6
|
||
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="ly-table1-listcontent"]/div[2]/div/div/ul/li[last()]
|
||
Should Be Equal As Strings ${text} ${Page}
|
||
|
||
ALL
|
||
[Arguments]
|
||
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[5]/div/div/div/div/div[2]/div[7]
|
||
sleep ${sleep}
|
||
click element xpath=//*[@id="policy_IP_library1"]/div/p/i
|
||
sleep ${sleep}
|
||
|
||
|
||
DeleteKeyrings_del
|
||
sleep ${sleep}
|
||
click id=appDel
|
||
sleep ${sleep}
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep ${sleep}
|
||
|
||
DeletehijackDel
|
||
sleep ${sleep}
|
||
click id=hijackDel
|
||
sleep ${sleep}
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep ${sleep}
|
||
|
||
DeleteresinseDel
|
||
sleep ${sleep}
|
||
click id=resinseDel
|
||
sleep ${sleep}
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep ${sleep}
|
||
|
||
Deletessl_del
|
||
sleep ${sleep}
|
||
click id=ssl_del
|
||
sleep ${sleep}
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep ${sleep}
|
||
|
||
DeletetrafficMirrorDel
|
||
sleep ${sleep}
|
||
click id=trafficMirrorDel
|
||
sleep ${sleep}
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep ${sleep}
|
||
|
||
DeleteAuthorities_del
|
||
sleep ${sleep}
|
||
click id=appDel
|
||
sleep ${sleep}
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep ${sleep}
|
||
|
||
DeleteSSLFingerprint
|
||
sleep ${sleep}
|
||
click id=Fingerprint_del
|
||
sleep ${sleep}
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep 3
|
||
|
||
DeletePacketCapture
|
||
sleep ${sleep}
|
||
click id=packet_del
|
||
sleep ${sleep}
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep ${sleep}
|
||
|
||
Policy_Verify_Switch
|
||
[Arguments] ${Protocol}
|
||
sleep ${sleep_min}
|
||
input xpath=//*[@id="objectName_seach"] ${Protocol}
|
||
press keys xpath=//*[@id="objectName_seach"] ENTER
|
||
sleep ${sleep_min}
|
||
|
||
UploadFilesSize
|
||
[Arguments] ${Page} ${name} ${file} ${Promptinfor}
|
||
[Documentation]
|
||
... 必填参数:
|
||
... ${Page}:测试页面Name包括ResponsePages、InsertScripts、HijackFiles
|
||
... ${name}:新建页面name输入框里的内容
|
||
... ${file}:上传文件本地
|
||
... ${Promptinfor}:页面提示信息
|
||
run keyword if "${Page}"=="ResponsePages" run keywords sleep ${sleep_min}
|
||
... AND click id=children6 #点击一级目录Settings
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
... AND sleep ${sleep}
|
||
... AND click id=respinseAdd #Response Pages点击Create
|
||
... AND sleep ${sleep}
|
||
... AND input id=responsepages_profileName1 ${name} #输入name
|
||
... AND sleep ${sleep}
|
||
... AND Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=responseAddOk1
|
||
... AND sleep ${sleep}
|
||
run keyword if "${Page}"=="InsertScripts" run keywords sleep ${sleep_min}
|
||
... AND click id=children6 #点击一级目录Settings
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
... AND sleep ${sleep}
|
||
... AND click id=profilesTabs_Profile_Insert #点击Insert Scripts按钮
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=insertAdd #点击Create
|
||
... AND sleep ${sleep}
|
||
... AND input id=insert_profileName1 ${name} #输入name
|
||
... AND sleep ${sleep}
|
||
... AND Choose File xpath=//*[@id="insertAddUpload"]/div[1]/input ${file} #上传文件
|
||
... AND sleep ${sleep}
|
||
... AND click id=insert_select_format #点击下拉框按钮
|
||
... AND sleep ${sleep_min}
|
||
... AND click //span[.="css"] #选择css
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=insertAddOk1 #点击OK
|
||
... AND sleep ${sleep}
|
||
run keyword if "${Page}"=="HijackFiles" run keywords sleep ${sleep_min}
|
||
... AND click id=children6 #点击一级目录Settings
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
|
||
... AND sleep ${sleep}
|
||
... AND click id=profilesTabs_Profile_HijackFiles #点击Hijack Files按钮
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=hijackAdd #点击Create
|
||
... AND sleep ${sleep}
|
||
... AND input id=hijack_profileName1 ${name} #输入name
|
||
... AND sleep ${sleep}
|
||
... AND Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[2]/div/div/div[1]/input ${file} #上传文件
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=hijackAddContentType #点击+ 打开侧滑窗口
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=text/html0
|
||
... AND sleep ${sleep}
|
||
... AND click id=hijackAddOk1
|
||
... AND sleep ${sleep}
|
||
run keyword if "${Page}"=="SSLFingerprint" run keywords sleep ${sleep_min}
|
||
... AND click id=children6 #点击一级目录Settings
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=sidebarProxy_CertificateManagement #点击二级目录
|
||
... AND sleep ${sleep}
|
||
... AND click xpath=//*[@id="proxyTabs"]/div/ul/li[5]
|
||
... AND sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[1]/span[2]/button
|
||
... AND sleep ${sleep_min}
|
||
... AND Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[4]/div/div/div[2]/div/div[1]/input ${file}
|
||
... AND sleep ${sleep}
|
||
... AND click id=Import_ua_Ok
|
||
... AND sleep ${sleep}
|
||
run keyword if "${Page}" == "TrustedCertificateAuthorities" run keywords sleep ${sleep_min}
|
||
... AND click id=children6
|
||
... AND sleep ${sleep_min}
|
||
... AND click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
|
||
... AND sleep ${sleep}
|
||
... AND click id=app_create #点击Import
|
||
... AND sleep ${sleep}
|
||
... AND input id=authoritiesAdd_name1 ${name} #输入name
|
||
... AND sleep ${sleep}
|
||
... AND Choose File xpath=//*[@id="upload_dome"]/div/input ${file} #上传文件
|
||
... AND sleep ${sleep}
|
||
... AND click id=authoritiesAdd_sub #点击OK缇交
|
||
... AND sleep ${sleep}
|
||
${text} get text xpath=/html/body/div[last()]/p
|
||
Should Be Equal As Strings ${text} ${Promptinfor}
|
||
|
||
DownLoadFile
|
||
[Arguments] ${UploadFilePath} ${DownloadFilePath}
|
||
[Documentation]
|
||
... ${UploadFilePath}:上传文件路径
|
||
... ${DownloadFilePath}:文件下载路径
|
||
sleep 3
|
||
${a} get_md5_01 ${UploadFilePath}
|
||
sleep ${sleep}
|
||
${b} get_md5_01 ${DownloadFilePath}
|
||
sleep ${sleep_min}
|
||
Should Be Equal As Strings ${a} ${b}
|
||
sleep ${sleep}
|
||
Remove File ${DownloadFilePath}
|
||
sleep ${sleep}
|
||
#Run_Keyword_And_Continue_On_Failure File_Should_Exist ${DownloadFilePath} #出错后继续执行,如文件在指定路径存在则通过
|
||
|
||
DeleteReferencedData
|
||
[Arguments] ${Page} ${SecondaryMenu} ${ID} ${PromptInformation} ${Three-level menu}=null
|
||
[Documentation]
|
||
... ${Page}:当前页面
|
||
... ${SecondaryMenu}:二级目录
|
||
... ${ID} :查询数据的ID
|
||
... ${PromptInformation} :提示信息
|
||
... ${Three-levelMenu}:三级菜单
|
||
sleep ${sleep_min}
|
||
click id=children6 #点击一级目录Settings
|
||
sleep ${sleep_min}
|
||
click id=${SecondaryMenu} #点击二级目录Proxy Profiles
|
||
sleep ${sleep}
|
||
run keyword if "${Three-levelMenu}"!="null" run keywords sleep ${sleep_min}
|
||
... AND click id=${Three-levelMenu}
|
||
sleep ${sleep_min}
|
||
Settings-Search ${ID} id
|
||
sleep ${sleep}
|
||
run keyword if "${Page}"=="ResponsePage" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr
|
||
... AND sleep ${sleep_min}
|
||
... AND DeleteresinseDel
|
||
run keyword if "${Page}"=="InsertScript" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr
|
||
... AND sleep ${sleep_min}
|
||
... AND Delete
|
||
run keyword if "${Page}"=="HijackFile" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/span
|
||
... AND sleep ${sleep_min}
|
||
... AND DeletehijackDel
|
||
run keyword if "${Page}"=="TrafficMirrorProfile" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
|
||
... AND sleep ${sleep_min}
|
||
... AND DeletetrafficMirrorDel
|
||
run keyword if "${Page}"=="DecryptionProfile" run keywords sleep ${sleep_min}
|
||
... AND click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span
|
||
... AND sleep ${sleep_min}
|
||
... AND Delete
|
||
${text} get text xpath=/html/body/div[last()]/p
|
||
Should Be Equal As Strings ${text} ${PromptInformation}
|
||
|
||
SettingsAssertion
|
||
[Arguments] ${assertxpath} ${asserttext}
|
||
${text} Get text xpath=${assertxpath}
|
||
Should Be Equal As Strings ${text} ${asserttext}
|
||
|
||
SettingsElementAttributes
|
||
[Arguments] ${assertxpath} ${asserttext} ${Element}
|
||
${text} Get Element Attribute xpath=${assertxpath} ${Element}
|
||
Should Be Equal As Strings ${text} ${asserttext}
|
||
|
||
|
||
SortButton
|
||
[Arguments] ${button} ${page} ${assertxpath}=null
|
||
[Documentation] 验证页面排序按钮
|
||
... ${button} 排序按钮位置,按钮xpath定位只输入到最后一个i
|
||
... ${assert} 断言位置
|
||
${One} Set Variable [1]
|
||
${Two} Set Variable [2]
|
||
${assert} Set Variable if "${page}" == "Trusted Certificate Authorities" //*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/div/p/span
|
||
... "${page}" == "Decryption Keyrings" //*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[3]/td[1]/div/div/div/p/span
|
||
... "${page}" == "Cached Intermediate Certificates" //*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/div/p/span
|
||
sleep ${sleep_min}
|
||
${text1} get text xpath=${assert}
|
||
click xpath=${button}${One}
|
||
sleep ${sleep}
|
||
${text2} get text xpath=${assert}
|
||
click xpath=${button}${Two}
|
||
sleep ${sleep}
|
||
${text3} get text xpath=${assert}
|
||
Should Not Be Equal ${text1} ${text2}
|
||
Should Not Be Equal ${text2} ${text3}
|
||
|
||
RandomNumber
|
||
[Documentation] 生成随机数
|
||
${a} evaluate random.randint(1000,9999) random
|
||
[RETURN] ${a}
|
||
|
||
|
||
ResponsrPageCreateAndEdit
|
||
[Arguments] ${ResponsrPageInfo}
|
||
[Documentation] 创建和修改ResponsePage
|
||
... ${CreateOrEdit} : 创建 或者修改
|
||
... ${Name} :名称
|
||
... ${EditName} :修改之后得名称
|
||
... ${file} :上传文件得路径
|
||
... ${search} : 查询的类型 name或者id
|
||
${return} ${CreateOrEdit} Run Keyword And Ignore Error Get From Dictionary ${ResponsrPageInfo} CreateOrEdit
|
||
${return} ${search} Run Keyword And Ignore Error Get From Dictionary ${ResponsrPageInfo} search
|
||
${return} ${Name} Run Keyword And Ignore Error Get From Dictionary ${ResponsrPageInfo} Name
|
||
${return} ${file} Run Keyword And Ignore Error Get From Dictionary ${ResponsrPageInfo} file
|
||
|
||
${return} ${EditName} Run Keyword And Ignore Error Get From Dictionary ${ResponsrPageInfo} EditName
|
||
${EditName} Run Keyword If "${return}"=="FAIL" or "${EditName}"=="${EMPTY}" set variable null
|
||
... ELSE set variable ${EditName}
|
||
|
||
${return} ${Delete} Run Keyword And Ignore Error Get From Dictionary ${ResponsrPageInfo} Delete
|
||
${Delete} Run Keyword If "${return}"=="FAIL" or "${Delete}"=="${EMPTY}" set variable No
|
||
... ELSE set variable ${Delete}
|
||
|
||
${return} ${Negtive} Run Keyword And Ignore Error Get From Dictionary ${ResponsrPageInfo} Negtive
|
||
${Negtive} Run Keyword If "${return}"=="FAIL" or "${Negtive}"=="${EMPTY}" set variable No
|
||
... ELSE set variable ${Negtive}
|
||
|
||
${return} ${Assertposition} Run Keyword And Ignore Error Get From Dictionary ${ResponsrPageInfo} Assertposition
|
||
${Assertposition} Run Keyword If "${return}"=="FAIL" or "${Negtive}"=="${EMPTY}" set variable null
|
||
... ELSE set variable ${Assertposition}
|
||
|
||
${return} ${asserttext} Run Keyword And Ignore Error Get From Dictionary ${ResponsrPageInfo} asserttext
|
||
${asserttext} Run Keyword If "${return}"=="FAIL" or "${asserttext}"=="${EMPTY}" set variable null
|
||
... ELSE set variable ${asserttext}
|
||
|
||
sleep ${sleep}
|
||
OpenPages sidebarProxy_Profiles profilesTabs_Profile_ResponsePages
|
||
${id} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span
|
||
run keyword if "${CreateOrEdit}" == "Create" run keywords sleep ${sleep_min}
|
||
... AND click id=respinseAdd
|
||
... AND sleep ${sleep}
|
||
... AND input id=responsepages_profileName1 ${Name}
|
||
run keyword if "${CreateOrEdit}" == "Edit" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${Name} name
|
||
... AND click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span
|
||
... AND sleep ${sleep}
|
||
... AND click id=resinseEdit
|
||
... AND sleep ${sleep}
|
||
... AND input id=responsepages_profileName1 ${EditName}
|
||
sleep ${sleep}
|
||
${uploadfile}= Set Variable if "${CreateOrEdit}" == "Create" xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input
|
||
... xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[5]/div/div/div/input
|
||
Choose File ${uploadfile} ${file}
|
||
sleep ${sleep}
|
||
click id=responseAddOk1 #点击OK缇交
|
||
sleep ${sleep}
|
||
run keyword if "${Negtive}" == "No" and "${CreateOrEdit}" == "Creaet" ResponsrPageCreateAssert ${search} ${Name} ${id}
|
||
... ELSE IF "${Negtive}" == "No" and "${CreateOrEdit}" == "Edit" ResponsrPageCreateAssert ${search} ${EditName} ${id}
|
||
... ELSE IF "${Negtive}" != "No" SettingsAssertion ${Assertposition} ${asserttext}
|
||
sleep ${sleep}
|
||
run keyword if "${Delete}" != "No" DeleteresinseDel1
|
||
... ELSE log 不删除数据
|
||
|
||
ResponsrPageCreateAssert
|
||
[Arguments] ${search} ${Name} ${id}
|
||
Wait Until Element Is Enabled id=respinseAdd ${sleep_Wait}
|
||
run keyword if "${search}"=="id" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${id} ${search} #搜索框的关键字
|
||
... ELSE IF "${search}"=="name" run keywords sleep ${sleep_min}
|
||
... AND Settings-Search ${Name} ${search} #搜索框的关键字
|
||
sleep ${sleep_min}
|
||
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span #获取点击后页面文本信息
|
||
SettingsAssertion //*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span ${Name}
|
||
|
||
|
||
DeleteresinseDel1
|
||
sleep ${sleep}
|
||
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span
|
||
sleep ${sleep}
|
||
click id=resinseDel
|
||
sleep ${sleep}
|
||
click xpath=/html/body/div/div/div[3]/button[2]
|
||
sleep ${sleep}
|