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