This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dongxiaoyan-tsg-autotest/02-Keyword/tsg_ui/setting/Settings.robot

1396 lines
70 KiB
Plaintext
Raw Normal View History

2020-05-29 17:01:46 +08:00
*** Settings ***
Library Selenium2Library
*** Keywords ***
click
[Arguments] ${element}
Click Element ${element}
input
[Arguments] ${element} ${text}
Input Text ${element} ${text}
ui-logout
Close Browser
ui-login
Open Browser http://192.168.40.120 Chrome
input xpath=//*[@id="app"]/div/div[2]/div/div[2]/div/input lyf
input xpath=//*[@id="app"]/div/div[2]/div/div[3]/div/input 111111
click xpath=//*[@id="app"]/div/div[2]/div/div[4]/button
Settings-Search
[Arguments] ${value} ${search}
Wait Until Element Is Visible xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div/div[1]/input 20
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div/div[1]/input #点击搜索框
sleep 1
#判断是使用name搜索还是id搜索
run keyword if "${search}"=="name" run keywords sleep 1
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[3]
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
... ELSE IF "${search}"=="id" run keywords sleep 1
... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[2]
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
... ELSE IF "${search}"=="Issuer" run keywords sleep 1
... AND click xpath=/html/body/div[7]/div[1]/div[1]/ul/li[4]
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
... ELSE IF "${search}"=="Common Name" run keywords sleep 1
... AND click xpath=/html/body/div[7]/div[1]/div[1]/ul/li[5]
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
... ELSE IF "${search}"=="Certificate Fingerprint" run keywords sleep 1
... AND click xpath=/html/body/div[7]/div[1]/div[1]/ul/li[6]
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
... ELSE IF "${search}"=="Source Website" run keywords sleep 1
... AND click xpath=/html/body/div[7]/div[1]/div[1]/ul/li[2]
... AND input xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[1]/span/div/i #点击搜索按钮
sleep 1
2020-05-29 17:01:46 +08:00
Create-Hijack Files
[Arguments] ${name} ${file} ${type} ${search} ${shift}=1 ${input1}=1
2020-05-29 17:01:46 +08:00
Sleep 1
click id=children6 #点击一级目录Settings
2020-05-29 17:01:46 +08:00
Sleep 1
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
Sleep 2
click id=profilesTabs_Profile_HijackFiles #点击Hijack Files按钮
Sleep 1
click id=hijackAdd #点击Create
Sleep 2
input id=hijack_profileName ${name} #输入name
Sleep 2
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} #上传文件
2020-05-29 17:01:46 +08:00
Sleep 2
${dow_name} Set Variable ${shift}
${input} Set Variable ${input1}
run keyword if "${dow_name}"=="close" and "${input}"=="shuru" run keywords sleep 1
... AND input id=hijack_contentName ${name}
... ELSE IF "${dow_name}"=="open" click xpath=//*[@id="contentNameChoose"]/div[1]/span[2]
sleep 1
click id=hijackAddContentType #点击+ 打开侧滑窗口
Sleep 1
click ${type} #选择文件类型
sleep 2
click id=hijackAddOk1 #点击OK
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} #断言
Create-Insert Scripts
[Arguments] ${name} ${file} ${type} ${search}
2020-05-29 17:01:46 +08:00
Sleep 1
click id=children6 #点击一级目录Settings
2020-05-29 17:01:46 +08:00
Sleep 1
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
Sleep 2
click id=profilesTabs_Profile_Insert #点击Insert Scripts按钮
Sleep 1
click id=insertAdd #点击Create
Sleep 2
input id=insert_profileName ${name} #输入name
Sleep 2
Choose File xpath=//*[@id="insertAddUpload"]/div[1]/input ${file} #上传文件
Sleep 2
click id=insert_select_format #点击下拉框按钮
Sleep 1
click ${type} #选择css
sleep 1
2020-07-13 19:15:02 +08:00
click id=insertAddOk1 #点击OK
2020-05-29 17:01:46 +08:00
Sleep 1
Settings-Search ${name} ${search} #搜索框的关键字
log psssssssssssssssssssssssssss
2020-05-29 17:01:46 +08:00
Sleep 1
${text1} Get Text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span
#//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span #获取点击后页面文本信息
2020-05-29 17:01:46 +08:00
Should Be Equal As Strings ${text1} ${name} #断言
Create-Traffic Mirror Profiles
[Arguments] ${name} ${type} ${shuru} ${search}
2020-05-29 17:01:46 +08:00
Sleep 1
click id=children6 #点击一级目录Settings
2020-05-29 17:01:46 +08:00
Sleep 1
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
Sleep 2
click id=profilesTabs_Profile_TrafficMirrorProfiles #点击Traffic Mirror Profiles按钮
Sleep 1
click id=trafficMirrorAdd #点击Create
Sleep 2
input id=trafficmirror_profileName ${name} #输入name
Sleep 2
click id=addrTypeChoose #点击下拉框
2020-05-29 17:01:46 +08:00
Sleep 2
click ${type} #选择vlan或者mac
2020-05-29 17:01:46 +08:00
Sleep 1
input id=trafficmirror_addrArray0 ${shuru}
sleep 2
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1] #点击OK
2020-05-29 17:01:46 +08:00
Sleep 2
Settings-Search ${name} ${search} #搜索框的关键字
2020-05-29 17:01:46 +08:00
Sleep 1
${text1} Get Text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span #获取点击后页面文本信息
2020-05-29 17:01:46 +08:00
Should Be Equal As Strings ${text1} ${name} #断言
Edit-Insert Scripts
[Arguments] ${id-name} ${name1} ${file} ${type} ${search}
2020-05-29 17:01:46 +08:00
[Documentation] 引用关键字,填入必填参数
... 必填参数:
... ${search}:为选择要查询的类型是ID或者Name的元素
... ${id-name}:为查询输入框输入内容
2020-05-29 17:01:46 +08:00
... ${name1}:为修改页面的name输入框里输入的内容
... ${file}:为修改页面要上传文件的路径
... ${type}:选择文件类型的元素
sleep 1
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
sleep 2
click id=profilesTabs_Profile_Insert #点击Insert files按钮
Settings-Search ${id-name} ${search} #搜索框的关键字
2020-05-29 17:01:46 +08:00
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div/div/div[3]/div[2]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表
2020-05-29 17:01:46 +08:00
sleep 1
click id=insertEdit #点击Edit
sleep 1
Clear Element Text id=insert_profileName #清空输入框
sleep 1
input id=insert_profileName ${name1} #输入框输入
sleep 1
Choose File xpath=//*[@id="insertAddUpload"]/div[1]/input ${file} #上传文件
sleep 1
click id=insert_select_format #点击下拉框
sleep 1
click ${type} #选择文件类型
sleep 1
2020-07-23 18:55:17 +08:00
click id=insertAddOk1 #点击ok提交
2020-05-29 17:01:46 +08:00
Create-Response Pages
[Arguments] ${name} ${file} ${search}
2020-05-29 17:01:46 +08:00
[Documentation] 引用次关键字,填入必填参数
... 必填参数:
... ${name}:新建页面name输入框里的内容
... ${file}:上传文件所在本地的路径
#打开浏览器
#ui-login lyf 111111
Sleep 1
click id=children6 #点击一级目录Settings
2020-05-29 17:01:46 +08:00
Sleep 1
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
Sleep 2
click id=respinseAdd #Response Pages点击Create
Sleep 2
input id=responsepages_profileName ${name} #输入name
Sleep 2
Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件
Sleep 2
2020-07-21 19:20:50 +08:00
click id=responseAddOk1 #点击OK缇交
Sleep 2
Settings-Search ${name} ${search} #搜索框的关键字
2020-05-29 17:01:46 +08:00
Sleep 1
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span #获取点击后页面文本信息
Should Be Equal As Strings ${text1} ${name} #断言
Edit-Response Pages
[Arguments] ${id-name} ${name1} ${file} ${search}
2020-05-29 17:01:46 +08:00
[Documentation] 引用关键字,填入必填参数
... 必填参数:
... ${search}:为选择要查询的类型是ID或者Name
... ${id-name}:为查询输入框输入内容
2020-05-29 17:01:46 +08:00
... ${name1}:为修改页面的name输入框里输入的内容
... ${file}:为修改页面要上传文件的路径
sleep 1
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
Sleep 2
Settings-Search ${id-name} ${search} #搜索框的关键字
2020-05-29 17:01:46 +08:00
Sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表
sleep 1
click id=resinseEdit #点击Edit
sleep 1
Clear Element Text id=responsepages_profileName #清空name输入框
sleep 1
input id=responsepages_profileName ${name1}
sleep 1
Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[5]/div/div/div/input ${file}
sleep 1
2020-07-23 18:55:17 +08:00
click id=responseAddOk1
Sleep 1
Settings-Search ${id-name} ${search} #搜索框的关键字
Sleep 1
${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
Edit-Hijack Files
[Arguments] ${id-name} ${name1} ${file} ${type} ${search} ${shift}=1
2020-05-29 17:01:46 +08:00
... ${input1}=1
[Documentation] 引用关键字,填入必填参数
... 必填参数:
... ${search}:为选择要查询的类型是ID或者Name的元素
... ${id-name}:为查询输入框输入内容
2020-05-29 17:01:46 +08:00
... ${name1}:为修改页面的name输入框里输入的内容
... ${file}:为修改页面要上传文件的路径
... ${type}:为文件类型的元素
sleep 1
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
Sleep 2
click id=profilesTabs_Profile_HijackFiles #点击Hijack files按钮
sleep 1
Settings-Search ${id-name} ${search} #搜索框的关键字
2020-05-29 17:01:46 +08:00
sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表
sleep 1
click id=hijackEdit #点击Edit
sleep 1
Clear Element Text id=hijack_profileName #清空输入框
sleep 1
input id=hijack_profileName ${name1} #输入框输入
sleep 1
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} #上传文件
2020-05-29 17:01:46 +08:00
sleep 1
${dow_name} Set Variable ${shift}
${input} Set Variable ${input1}
run keyword if "${dow_name}"=="close" and "${input}"=="shuru" run keywords sleep 1
... AND input id=hijack_contentName ${name}
... ELSE IF "${dow_name}"=="open" click xpath=//*[@id="contentNameChoose"]/div[1]/span[2]
sleep 1
click id=hijackAddContentType #点击+号打开侧滑框
sleep 3
click ${type} #选择类型
sleep 1
click id=rigth-menu-button-close #关闭侧滑框
2020-05-29 17:01:46 +08:00
sleep 1
2020-07-23 18:55:17 +08:00
click id=hijackAddOk1 #点击ok提交
Settings-Search ${id-name} ${search} #搜索框的关键字
${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/span #获取点击后页面文本信息
Should Be Equal As Strings ${text1} ${name1} #断言
2020-05-29 17:01:46 +08:00
Edit-Traffic Mirror Profiles
[Arguments] ${id-name} ${name1} ${type} ${shuju} ${search}
2020-05-29 17:01:46 +08:00
[Documentation] 引用关键字,填入必填参数
... 必填参数:
... ${search}:为选择要查询的类型是ID或者Name的元素
... ${id-name}:为查询输入框输入内容
2020-05-29 17:01:46 +08:00
... ${name1}:为修改页面的name输入框里输入的内容
... ${type}:为选择点击vlan或mac的元素
... ${shuju}:为输入框输入内容
sleep 1
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
Sleep 2
click id=profilesTabs_Profile_TrafficMirrorProfiles #点击Traffic Mirror Profiles按钮
sleep 1
Settings-Search ${id-name} ${search} #搜索框的关键字
2020-05-29 17:01:46 +08:00
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div/div/div[3]/div[2]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表
2020-05-29 17:01:46 +08:00
sleep 1
click id=trafficMirrorEdit #点击Edit
sleep 1
Clear Element Text id=trafficmirror_profileName #清空输入框
sleep 1
input id=trafficmirror_profileName ${name1} #输入框输入
sleep 1
click id=addrTypeChoose #点击下拉框
2020-05-29 17:01:46 +08:00
sleep 1
click ${type} #选择vlan或者mac
sleep 1
Clear Element Text id=trafficmirror_addrArray0 #清空输入框
sleep 1
input id=trafficmirror_addrArray0 ${shuju} #输入内容
sleep 1
2020-07-21 19:20:50 +08:00
click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/button[1] #点击ok
Sleep 2
Settings-Search ${id-name} ${search} #搜索框的关键字
Sleep 1
${text1} Get Text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span #获取点击后页面文本信息
Should Be Equal As Strings ${text1} ${name1} #断言
2020-05-29 17:01:46 +08:00
import-Trusted Certificate Authorities
[Arguments] ${name} ${file} ${search}
2020-05-29 17:01:46 +08:00
[Documentation] 引用次关键字,填入必填参数
... 必填参数:
... ${name}:新建页面name输入框里的内容
... ${file}:上传文件所在本地的路径
#打开浏览器
#ui-login lyf 111111
Sleep 1
click id=children6 #点击一级目录Settings
2020-05-29 17:01:46 +08:00
Sleep 1
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
Sleep 2
click id=Authorities_create #点击Import
Sleep 2
input id=authoritiesAdd_name ${name} #输入name
Sleep 2
Choose File xpath=//*[@id="upload_dome"]/div/input ${file} #上传文件
Sleep 2
click id=authoritiesAdd_sub #点击OK缇交
Sleep 1
Settings-Search ${name} ${search}
2020-05-29 17:01:46 +08:00
Sleep 1
${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} #断言
Create-Decryption Keyrings
[Arguments] ${name} ${file} ${file1} ${1or2} ${type} ${type1} ${search}
2020-05-29 17:01:46 +08:00
... ${shift}=close
[Documentation] 引用次关键字,填入必填参数
... 必填参数:
... ${name}:新建页面name输入框里的内容
... ${file}:上传文件所在本地的路径
... ${file1}:上传文件所在本地的路径
... ${1or2}:填入1 或者其他
... ${type}:上传证书类型的元素
... ${type1}:上传证书加密解密算法的元素
#打开浏览器
#ui-login lyf 111111
Sleep 1
click id=children6 #点击一级目录Settings
2020-05-29 17:01:46 +08:00
Sleep 1
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
Sleep 2
click xpath=//*[@id="proxyTabs"]/div/ul/li[2] #点击Decryption Keyrings
sleep 1
click id=Keyrings_create #点击Create
Sleep 2
input id=keyringsadd_name ${name} #输入name
Sleep 2
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件
2020-05-29 17:01:46 +08:00
Sleep 2
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[3]/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
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[6]/div/div/div[1]/span/span/i #点击下拉框
2020-05-29 17:01:46 +08:00
sleep 1
click ${type} #选择证书类型
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[7]/div/div/div[1]/span/span/i #点击下拉框
2020-05-29 17:01:46 +08:00
sleep 1
click ${type1} #选择加密解密类型
sleep 1
${root} Set Variable ${shift}
run keyword if "${root}"=="open" run keywords sleep 1
... AND click xpath=//*[@id="app"]/div/div[3]/div/div/div[3]/div/div[2]/form/div[10]/div/div
2020-05-29 17:01:46 +08:00
... ELSE IF "${root}"=="close" log "go on"
click id=keyringsadd_sub #点击OK缇交
Sleep 2
Settings-Search ${name} ${search}
2020-05-29 17:01:46 +08:00
Sleep 1
${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} #断言
Create-SSL Decryption Exclusion
[Arguments] ${name} ${value} ${name1} ${search}
2020-05-29 17:01:46 +08:00
[Documentation] 引用次关键字,填入必填参数
... 必填参数:
... ${name}:新建页面name输入框里的内容
... ${value}:输入内容
... ${naem1}:搜索框填入内容
Sleep 1
click id=children6 #点击一级目录Settings
2020-05-29 17:01:46 +08:00
Sleep 1
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
Sleep 2
click xpath=//*[@id="proxyTabs"]/div/ul/li[3] #点击SSL Decryption Exclusion按钮
sleep 1
click id=ssl_create #点击Create
Sleep 2
input id=sslAdd_name ${name} #输入name
Sleep 2
input id=sslAdd_itemDesc ${value} #输入内容
Sleep 2
click id=ssl_ok #点击OK缇交
Sleep 1
Settings-Search ${name1} ${search}
2020-05-29 17:01:46 +08:00
Sleep 1
${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} #断言
Search-Cached Intermediate Certificates
[Arguments] ${type} ${enabled} ${search}
2020-05-29 17:01:46 +08:00
[Documentation] 引用关键字,填入必填参数
... ${type}:为搜索类型的元素id或sni
... ${enabled}为enabled开启或关闭按钮的元素
Sleep 1
Settings-Search ${type} ${search}
2020-05-29 17:01:46 +08:00
Sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[8]/div/div/div/p/i #点击下载
2020-05-29 17:01:46 +08:00
Sleep 10
click ${enabled} #点击enabled按钮
sleep 1
Edit-Trusted Certificate Authorities
[Arguments] ${id-name} ${name} ${file} ${search}
2020-05-29 17:01:46 +08:00
[Documentation] 引用关键字,填入必填参数
... 必填参数:
... ${search}:为选择要查询的类型是ID或者Name的元素
... ${id-name}:为查询输入框输入内容
2020-05-29 17:01:46 +08:00
... ${name}:为修改页面的name输入框里输入的内容
... ${file}:为修改页面要上传文件的路径
sleep 1
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
Sleep 2
Settings-Search ${id-name} ${search}
2020-05-29 17:01:46 +08:00
sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr #点击搜索列表
sleep 1
click id=Authorities_edit #点击Edit按钮
sleep 1
Clear Element Text id=authoritiesAdd_name #清空name输入框
sleep 1
input id=authoritiesAdd_name ${name} #输入name
sleep 1
Choose File xpath=//*[@id="upload_dome"]/div/input ${file} #上传文件
sleep 1
click id=authoritiesAdd_sub #点击ok
sleep 1
2020-05-29 17:01:46 +08:00
Edit-Decryption Keyrings
[Arguments] ${id-name} ${name} ${file} ${file1} ${1or2}
... ${type} ${type1} ${search}
2020-05-29 17:01:46 +08:00
[Documentation] 引用次关键字,填入必填参数
... 必填参数:
... ${search}:为选择要查询的类型是ID或者Name的元素
... ${id-name}:为查询输入框输入内容
2020-05-29 17:01:46 +08:00
... ${name}:新建页面name输入框里的内容
... ${file}:上传文件所在本地的路径
... ${file1}:上传文件所在本地的路径
... ${1or2}:填入1 或者其他
... ${type}:上传证书类型的元素
... ${type1}:上传证书加密解密算法的元素
sleep 1
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
Sleep 2
click xpath=//*[@id="proxyTabs"]/div/ul/li[2] #点击Decryption Keyrings
sleep 1
Settings-Search ${id-name} ${search}
2020-05-29 17:01:46 +08:00
sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr #点击搜索列表
sleep 1
click id=Keyrings_edit #点击Edit按钮
sleep 1
Clear Element Text id=keyringsadd_name #清空name输入框
sleep 1
input id=keyringsadd_name ${name} #输入name
sleep 1
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[5]/div/div/div/input ${file} #上传文件
2020-05-29 17:01:46 +08:00
Sleep 2
Choose File xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/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
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[9]/div/div/div[1]/span/span/i #点击下拉框
2020-05-29 17:01:46 +08:00
sleep 1
click ${type} #选择证书类型
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[10]/div/div/div[1]/span/span/i #点击下拉框
sleep 2
2020-05-29 17:01:46 +08:00
click ${type1} #选择加密解密类型
sleep 1
click id=keyringsadd_sub #点击OK缇交
Sleep 2
Settings-Search ${name} ${search}
Sleep 1
${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
Edit-SSL Decryption Exclusion
[Arguments] ${id-name} ${name} ${value1} ${name1} ${search}
2020-05-29 17:01:46 +08:00
[Documentation] 引用关键字,填入必填参数
... ${search}:id或者name的元素
... ${id-name}:输入搜索的内容
2020-05-29 17:01:46 +08:00
... ${name}:输入name
... ${calue1}:输入内容
sleep 1
click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities
Sleep 2
click xpath=//*[@id="proxyTabs"]/div/ul/li[3] #点击SSL Decryption Exclusion按钮
sleep 1
Settings-Search ${id-name} ${search}
2020-05-29 17:01:46 +08:00
sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr #点击搜索列表
Sleep 1
click id=ssl_edit #点击Edit
Sleep 1
Clear Element Text id=sslAdd_name #清空name输入框
sleep 1
input id=sslAdd_name ${name} #输入name
sleep 1
input id=sslAdd_itemDesc ${value1} #输入内容
sleep 1
2020-05-29 17:01:46 +08:00
click id=ssl_ok #点击OK缇交
Sleep 2
Settings-Search ${id-name} ${search}
Sleep 1
${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
Settings_swarch_name
[Arguments] ${name}
sleep 2
click element id=one-input
sleep 2
click element id=input_list_li2
sleep 2
input text id=sreach_input ${name}
sleep 2
click element id=select_new_search_btn
sleep 2
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table
Create-Policy_Verify
[Arguments] ${name} ${list2}=null ${fail1}=null ${list4}=null ${list6}=null ${min1}=null
... ${max1}=null
Sleep 1
click id=children5 #点击一级目录Settings
Sleep 1
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
sleep 2
click id=profilesTabs_Profile_DecryptionProfile #点击Decryption Profile
Sleep 1
click id=insertAdd #点击Create
Sleep 1
input id=insert_profileName ${name}
Sleep 1
@{list} Create List Common Name Issuer Self-signed Expiry Date Mutual Authentication
... On Protocol Errors Certificate Pinning Mirror Client Versions Allow HTTP/2
: FOR ${i} IN @{list}
\ click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), "${i}")]/following-sibling::div/div/span
\ sleep 1
@{list1} Set Variable ${list2}
${fail} Set Variable ${fail1}
: FOR ${j} IN @{list1}
\ run keyword if "@{list1}"=="[]" Exit for loop
\ ... ELSE Run Keywords click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), "${j}")]/following-sibling::div/div/span
\ ... AND sleep 1
run keyword if "${fail}"=="Fail-close" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[5]/div/div/label[1]/span
... ELSE IF "${fail}"=="Pass-through" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[5]/div/div/label[2]/span
... ELSE log 1111
@{list3} Set Variable ${list4}
: FOR ${k} IN @{list3}
\ run keyword if "@{list3}"=="[]" Exit for loop
\ ... ELSE Run Keywords click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), "${k}")]/following-sibling::div/div/span
\ ... AND sleep 1
@{list5} Set Variable ${list6}
${min} Set Variable ${min1}
${max} Set Variable ${max1}
: FOR ${z} IN @{list5}
\ run keyword if "@{list5}"=="[]" Min_max_version ${min} ${max}
\ ... ELSE IF "${z}"=="Allow HTTP/2" Run Keywords sleep 1
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), "${z}")]/following-sibling::div/div/span
\ ... ELSE IF "${z}"=="Mirror Client Versions" Run Keywords sleep 1
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), "${z}")]/following-sibling::div/div/span
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${min}"=="TLSv1.0" Run Keywords sleep 1
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
\ ... AND sleep 1
\ ... AND click id=pro_min1
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${min}"=="TLSv1.1" Run Keywords sleep 1
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
\ ... AND sleep 1
\ ... AND click id=pro_min2
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${min}"=="TLSv1.2" Run Keywords sleep 1
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
\ ... AND sleep 1
\ ... AND click id=pro_min3
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${min}"=="TLSv1.3" Run Keywords sleep 1
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
\ ... AND sleep 1
\ ... AND click id=pro_min4
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${min}"=="SSLv3.0" Run Keywords sleep 1
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
\ ... AND sleep 1
\ ... AND click id=pro_max0
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${max}"=="TLSv1.0" Run Keywords sleep 1
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
\ ... AND sleep 1
\ ... AND click id=pro_max1
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${max}"=="TLSv1.1" Run Keywords sleep 1
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
\ ... AND sleep 1
\ ... AND click id=pro_max2
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${max}"=="TLSv1.2" Run Keywords sleep 1
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
\ ... AND sleep 1
\ ... AND click id=pro_max3
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${max}"=="TLSv1.3" Run Keywords sleep 1
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
\ ... AND sleep 1
\ ... AND click id=pro_max4
\ ... ELSE IF "${z}"!="Mirror Client Versions" and "${max}"=="SSLv3.0" Run Keywords sleep 1
\ ... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
\ ... AND sleep 1
\ ... AND click id=pro_max0
sleep 1
run keyword if "@{list5}"=="[]" Min_max_version ${min} ${max}
${class}= Get Element Attribute xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[1]/div/div class
log ${class}
click id=insertAddOk1
Min_max_version
[Arguments] ${min} ${max}
run keyword if "${min}"=="TLSv1.0" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min1
... ELSE IF "${min}"=="TLSv1.1" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min2
... ELSE IF "${min}"=="TLSv1.2" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min3
... ELSE IF "${min}"=="TLSv1.3" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min4
... ELSE IF "${min}"=="SSLv3.0" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max0
... ELSE log 错误
run keyword if "${max}"=="TLSv1.0" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max1
... ELSE IF "${max}"=="TLSv1.1" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max2
... ELSE IF "${max}"=="TLSv1.2" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max3
... ELSE IF "${max}"=="TLSv1.3" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max4
... ELSE IF "${max}"=="SSLv3.0" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max0
... ELSE log 错误
Create-Decryption_Profile
[Arguments] ${name} ${search} ${dict1}=null ${fail1}=null ${min1}=null ${max1}=null
2020-05-29 17:01:46 +08:00
Sleep 1
click id=children6 #点击一级目录Settings
2020-05-29 17:01:46 +08:00
Sleep 1
click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
sleep 2
click id=profilesTabs_Profile_DecryptionProfile #点击Decryption Profile
Sleep 1
click id=insertAdd #点击Create
Sleep 1
input id=insert_profileName ${name}
Sleep 1
Button_Switch ${dict1} //*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), " ")]/following-sibling::div/div el-switch is-checked el-switch
${fail} Set Variable ${fail1}
run keyword if "${fail}"=="Fail-close" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[5]/div/div/label[1]/span
... ELSE IF "${fail}"=="Pass-through" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[3]/div[5]/div/div/label[2]/span
... ELSE log 1111
${min} Set Variable ${min1}
${max} Set Variable ${max1}
run keyword if "${min}"=="TLSv1.0" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min1
... ELSE IF "${min}"=="TLSv1.1" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min2
... ELSE IF "${min}"=="TLSv1.2" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min3
... ELSE IF "${min}"=="TLSv1.3" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min4
... ELSE IF "${min}"=="SSLv3.0" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min0
... ELSE log 错误
run keyword if "${max}"=="TLSv1.0" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max1
... ELSE IF "${max}"=="TLSv1.1" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max2
... ELSE IF "${max}"=="TLSv1.2" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max3
... ELSE IF "${max}"=="TLSv1.3" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max4
... ELSE IF "${max}"=="SSLv3.0" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[7]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max0
... ELSE log 错误
sleep 2
2020-07-13 18:45:24 +08:00
click id=decryption-ok
2020-05-29 17:01:46 +08:00
sleep 2
Settings-Search ${name} ${search} #搜索框的关键字
2020-05-29 17:01:46 +08:00
sleep 2
${name1} get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span
2020-05-29 17:01:46 +08:00
Should Be Equal As Strings ${name1} ${name}
2020-05-29 17:01:46 +08:00
Button_Switch
[Arguments] ${dict1} ${xpath1} ${xpath2} ${open} ${close}
${dict} Set Variable ${dict1}
: FOR ${list} ${key} IN ENUMERATE @{dict}
\ ${class}= Get Element Attribute xpath=${xpath1}${key}${xpath2} class
\ run keyword if "${class}"=="${open}" and "${dict}[${key}]"=="1" log 默认开启,不进行操作
\ run keyword if "${class}"=="${open}" and "${dict}[${key}]"=="0" Run Keywords log 默认开启,但需求需要关闭,进行点击关闭按钮
\ ... AND sleep 1
\ ... AND click xpath=${xpath1}${key}${xpath2}/span
\ run keyword if "${class}"=="${close}" and "${dict}[${key}]"=="1" Run Keywords log 默认关闭,但需求需要开启,进行点击开启按钮
\ ... AND sleep 1
\ ... AND click xpath=${xpath1}${key}${xpath2}/span
\ run keyword if "${class}"=="${close}" and "${dict}[${key}]"=="0" log 默认关闭,不进行操作
Edit_Decryption Profile
[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
sleep 2
click id=profilesTabs_Profile_DecryptionProfile #点击Decryption Profile
Sleep 1
Settings-Search ${id-name} ${search} #搜索框的关键字
2020-05-29 17:01:46 +08:00
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span #点击搜索列表
2020-05-29 17:01:46 +08:00
Sleep 1
click id=insertEdit #点击Edit
Sleep 2
Clear Element Text id=insert_profileName #清空name输入框
sleep 1
input id=insert_profileName ${name} #输入name
sleep 1
Button_Switch ${dict1} //*[@id="policy_Manipulation_create8"]/div[2]/form/div/div/label[contains(text(), " ")]/following-sibling::div/div el-switch is-checked el-switch
${fail} Set Variable ${fail1}
run keyword if "${fail}"=="Fail-close" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[6]/div[5]/div/div/label[1]/span
... ELSE IF "${fail}"=="Pass-through" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[6]/div[5]/div/div/label[2]/span
... ELSE log 1111
${min} Set Variable ${min1}
${max} Set Variable ${max1}
run keyword if "${min}"=="TLSv1.0" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min1
... ELSE IF "${min}"=="TLSv1.1" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min2
... ELSE IF "${min}"=="TLSv1.2" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min3
... ELSE IF "${min}"=="TLSv1.3" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min4
... ELSE IF "${min}"=="SSLv3.0" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[2]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_min0
... ELSE log 错误
run keyword if "${max}"=="TLSv1.0" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[3]/div/div/div[1]/span/span/i
... AND sleep 1
... AND click id=pro_max1
... ELSE IF "${max}"=="TLSv1.1" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max2
... ELSE IF "${max}"=="TLSv1.2" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max3
... ELSE IF "${max}"=="TLSv1.3" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max4
... ELSE IF "${max}"=="SSLv3.0" Run Keywords sleep 1
... AND click xpath=//*[@id="policy_Manipulation_create8"]/div[2]/form/div[10]/div[3]/div/div/div/span/span/i
... AND sleep 1
... AND click id=pro_max0
... ELSE log 错误
2020-07-14 10:45:57 +08:00
click id=decryption-ok
2020-05-29 17:01:46 +08:00
sleep 2
Settings-Search ${id-name} ${search} #搜索框的关键字
${name1} get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span
2020-05-29 17:01:46 +08:00
Should Be Equal As Strings ${name1} ${name}
sleep 1
click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span
2020-05-29 17:01:46 +08:00
Delete
Delete
sleep 2
click id=insertDel
sleep 3
2020-05-29 17:01:46 +08:00
click xpath=/html/body/div/div/div[3]/button[2]
sleep 2
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
2020-05-29 17:01:46 +08:00
Sleep 1
click id=children6 #点击一级目录Settings
2020-05-29 17:01:46 +08:00
Sleep 1
click id=sidebarTrouble_shooting #点击二级目录Trouble Shooting
Sleep 2
click id=Proxy_Profiles_Profile_ResponsePages #点击Policy Verify按钮
Sleep 1
${Select-Test} Set Variable ${Select-Test1}
Run Keyword If "${Select-Test}"=="Security Policy Match" Run Keywords click id=SelectPolicy
2020-05-29 17:01:46 +08:00
... AND sleep 1
... AND click id=SelectPolicytsg_security0
... ELSE IF "${Select-Test}"=="Proxy Policy Match" Run Keywords click id=SelectPolicy
2020-05-29 17:01:46 +08:00
... AND sleep 1
... AND click id=SelectPolicypxy_manipulation1
2020-05-29 17:01:46 +08:00
... ELSE log 错误
${Address-type} Set Variable ${Address-type1}
Run Keyword If "${Address-type}"=="v4" Run Keywords click id=ip_addrType
2020-05-29 17:01:46 +08:00
... AND sleep 1
... AND click id=ip_addrType1
... ELSE IF "${Address-type}"=="v6" Run Keywords click id=ip_addrType
2020-05-29 17:01:46 +08:00
... AND sleep 1
... 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 默认参数,不输入
... ELSE input id=clientIp ${Client-IP}
2020-05-29 17:01:46 +08:00
sleep 2
2020-05-29 18:57:17 +08:00
${Client-Port} Set Variable ${Client-Port1}
Run Keyword If "${Client-Port}"=="null" log 默认参数,不输入
... ELSE input id=clientPort ${Client-Port}
2020-05-29 17:01:46 +08:00
sleep 2
2020-05-29 18:57:17 +08:00
${Server-IP} Set Variable ${Server-IP1}
Run Keyword If "${Server-IP}"=="null" log 默认参数,不输入
... ELSE input id=serverIp ${Server-IP}
2020-05-29 18:57:17 +08:00
sleep 2
${Server-Port} Set Variable ${Server-Port1}
Run Keyword If "${Server-Port}"=="null" log 默认参数,不输入
... ELSE input id=ip_serverPort ${Server-Port}
2020-05-29 17:01:46 +08:00
sleep 2
${Protocol} Set Variable ${Protocol1}
Run Keyword If "${Protocol}"=="Any" Run Keywords click id=ip_protocol
2020-05-29 17:01:46 +08:00
... AND sleep 1
... AND click id=ip_protocol0Any
... ELSE IF "${Protocol}"=="TCP" Run Keywords click id=ip_protocol
2020-05-29 17:01:46 +08:00
... AND sleep 1
... AND click id=ip_protocol6TCP
... ELSE IF "${Protocol}"=="UDP" Run Keywords click id=ip_protocol
2020-05-29 17:01:46 +08:00
... AND sleep 1
... AND click id=ip_protocol17UDP
2020-05-29 18:57:17 +08:00
sleep 2
${Subscriber-ID} Set Variable ${Subscriber-ID1}
Run Keyword If "${Subscriber-ID}"=="null" log 默认参数,不输入
... ELSE input id=SubscriberID ${Subscriber-ID}
2020-05-29 18:57:17 +08:00
sleep 2
${APP-ID} Set Variable ${APP-ID1}
Run Keyword If "${Select-Test}"=="Security Policy Match" and "${APP-ID}"=="Protocol-HTTP" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
... AND sleep 2
... AND Policy_Verify_Switch ${APP-ID}
2020-05-29 18:57:17 +08:00
... AND click id=Protocol-HTTPhttp
... AND sleep 2
... ELSE IF "${Select-Test}"=="Security Policy Match" and "${APP-ID}"=="Protocol-SSL" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
2020-05-29 18:57:17 +08:00
... AND sleep 2
... AND Policy_Verify_Switch ${APP-ID}
... AND click id=Protocol-SSLssl
... ELSE IF "${Select-Test}"=="Security Policy Match" and "${APP-ID}"=="Protocol-DNS" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
2020-05-29 18:57:17 +08:00
... AND sleep 2
... AND Policy_Verify_Switch ${APP-ID}
... AND click id=Protocol-DNSdns
... ELSE IF "${Select-Test}"=="Security Policy Match" and "${APP-ID}"=="Protocol-MAIL" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
2020-05-29 18:57:17 +08:00
... AND sleep 2
... AND Policy_Verify_Switch ${APP-ID}
... AND click id=Protocol-MAILmail
... ELSE IF "${Select-Test}"=="Security Policy Match" and "${APP-ID}"=="Protocol-FTP" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
2020-05-29 18:57:17 +08:00
... AND sleep 2
... AND Policy_Verify_Switch ${APP-ID}
... AND click id=Protocol-FTPftp
... ELSE IF "${Select-Test}"=="Proxy Policy Match" and "${APP-ID}"=="Protocol-HTTP" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
2020-05-29 18:57:17 +08:00
... AND sleep 2
... AND Policy_Verify_Switch ${APP-ID}
... AND click id=Protocol-HTTPhttp
... ELSE IF "${Select-Test}"=="Proxy Policy Match" and "${APP-ID}"=="Protocol-DoH" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div[1]/div/div/div[1]/div[1]/form/div[9]/div/div
... AND sleep 2
... AND Policy_Verify_Switch ${APP-ID}
... 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}
\ run keyword if "${key}"=="URL" and "${APP-ID}"=="Protocol-HTTP" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
\ ... AND sleep 2
\ ... AND click id=attributeNameurlURL
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="Host" and "${APP-ID}"=="Protocol-HTTP" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
\ ... AND sleep 2
\ ... AND click id=attributeNamehostHost
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="REQ Body" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNamereq_bodyREQ Body
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="RES Body" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNameres_bodyRES Body
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="REQ HDR" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNamereq_hdrREQ HDR
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND Req_Res_Body ${dict}[${key}]
\ ... AND sleep 1
\ run keyword if "${key}"=="RES HDR" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNameres_hdrRES HDR
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND Req_Res_Body ${dict}[${key}]
\ ... AND sleep 1
\ run keyword if "${key}"=="SNI" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNamesniSNI
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="SAN" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNamesanSAN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="CN" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNamecnCN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="QNAME" and "${APP-ID}"=="Protocol-DNS" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNameqnameQNAME
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="From" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNamefromFrom
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="To" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNametoTo
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="Account" and "${APP-ID}"=="Protocol-MAIL" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNameaccountAccount
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="Subject" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNamesubjectSubject
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="Content" and "${APP-ID}"=="Protocol-MAIL" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNamecontentContent
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="ATT Name" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNameatt_nameATT Name
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="ATT CONT" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNameatt_contentATT CONT
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="URL" and "${APP-ID}"=="Protocol-FTP" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNameurlURL
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="Content" and "${APP-ID}"=="Protocol-FTP" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNamecontentContent
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ run keyword if "${key}"=="Account" and "${APP-ID}"=="Protocol-FTP" Run Keywords click id=selectAppidBTN
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeName
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeNameaccountAccount
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
\ ... AND sleep 1
\ run keyword if "${key}"=="QNAME" and "${APP-ID}"=="Protocol-DoH" Run Keywords click id=selectAppidBTN
\ ... AND sleep 1
\ ... AND click id=attributeName
\ ... AND sleep 1
\ ... AND click id=attributeNameqnameQNAME
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
\ ... AND sleep 1
\ run keyword if "${key}"=="Host" and "${APP-ID}"=="Protocol-DoH" Run Keywords click id=selectAppidBTN
\ ... AND sleep 1
\ ... AND click id=attributeName
\ ... AND sleep 1
\ ... AND click id=attributeNamehostHost
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
sleep 2
click id=verify-ok
2020-05-29 18:57:17 +08:00
sleep 2
${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]
2020-05-29 18:57:17 +08:00
sleep 2
Should Be Equal As Strings ${State} Execute #断言
Req_Res_Body
[Arguments] ${dict1}
${dict} Set Variable ${dict1}
: FOR ${list} ${key} IN ENUMERATE @{dict}
\ run keyword if "${key}"=="User Agent" Run Keywords click id=attributeValue_district
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeValue_districtUser-AgentUser Agent
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
\ run keyword if "${key}"=="Cookie" Run Keywords click id=attributeValue_district
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeValue_districtCookieCookie
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
\ run keyword if "${key}"=="Set-Cookie" Run Keywords click id=attributeValue_district
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeValue_districtSet-CookieSet-Cookie
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
\ run keyword if "${key}"=="Content-Type" Run Keywords click id=attributeValue_district
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND click id=attributeValue_districtContent-TypeContent-Type
2020-05-29 18:57:17 +08:00
\ ... AND sleep 1
\ ... AND input id=attributeValue_string ${dict}[${key}]
Create_Ip_Libraries
[Arguments] ${type} ${Continent/Country} ${GeoNameID} ${City} ${ip} ${j}=1 ${Country}=null ${Longitude}=null ${Latitude}=null
Sleep 1
click id=children5 #点击一级目录Settings
Sleep 1
click id=sidebarIP_Libraries #点击二级目录IP_Libraries
Sleep 2
click id=tagAdd #点击Create按钮
sleep 2
run keyword if "${type}"=="Country" Run Keywords click id=security_action_country
... AND sleep 1
... AND click id=ip_geography_continent
... AND sleep 1
... AND Switch_Geographic_Locations ${Continent/Country}
... AND input id=ip_geography_Country1 ${Country}
run keyword if "${type}"=="City" Run Keywords click id=security_action_city
... AND sleep 1
2020-07-21 19:20:50 +08:00
... AND click id=ip_geography_Country
... AND sleep 1
... AND Switch_Geographic_Locations ${Continent/Country}
sleep 1
input id=ip_geography_name ${GeoNameID}
sleep 1
input id=ip_geography_City ${City}
sleep 1
click id=ip_geography_IPRange
sleep 1
input id=ip_input0 ${ip}[0]
sleep 1
run keyword if "${j}"!="1" Ip_Range_Create ${j} ${ip}
run keyword if "${Longitude}"!="null" Run Keywords input id=ip_geography_longitude ${Longitude}
... AND sleep 1
run keyword if "${Latitude}"!="null" Run Keywords input id=ip_geography_latitude ${Latitude}
... AND sleep 1
click id=IP_library_add
sleep 2
#验证新建是否成功
Switch_GeoName ${GeoNameID}
${GeoNameText} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 2
Should Be Equal As Strings ${GeoNameText} ${GeoNameID} #断言
2020-07-21 19:20:50 +08:00
Edit_Ip_Libraries
[Arguments] ${GeoNameID} ${City}=null ${ip}=null ${j}=1 ${Country}=null ${Longitude}=null ${Latitude}=null ${type}=null ${type1}=null
click id=tagEdit #点击Edit按钮
sleep 2
run keyword if "${City}"!="null" input id=ip_geography_City ${City}
sleep 1
run keyword if "${type}"=="edit" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[2]/form/div[3]/div/div[2]/div[2]/ul/li/div[2]/i[1]
... AND sleep 1
... AND clear element text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[2]/form/div[3]/div/div[2]/div[2]/ul/li/div[1]/form/div/div/div
... AND sleep 1
... AND input id=ip_input0 ${ip}[0]
... AND sleep 1
run keyword if "${type}"=="create" Ip_Range_Edit_Create ${j} ${ip}
sleep 1
run keyword if "${type}"=="delete" and "${type1}"=="create" Run Keywords click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[2]/form/div[3]/div/div[2]/div[2]/ul/li/div[2]/i[2]
... AND sleep 1
... AND Ip_Range_Edit_Create ${j} ${ip}
run keyword if "${type}"=="null" log 不做更改
run keyword if "${Longitude}"!="null" Run Keywords input id=ip_geography_longitude ${Longitude}
... AND sleep 1
run keyword if "${Latitude}"!="null" Run Keywords input id=ip_geography_latitude ${Latitude}
... AND sleep 1
click id=IP_library_add
sleep 2
#验证修改是否成功
Switch_GeoName ${GeoNameID}
${GeoNameText} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 2
Should Be Equal As Strings ${GeoNameText} ${GeoNameID} #断言
Switch_Geographic_Locations
[Arguments] ${Continent/Country}
sleep 1
input id=objectName_seach ${Continent/Country}
sleep 1
press keys id=objectName_seach ENTER
sleep 2
click xpath=//*[@id="right_locationList"]/div[2]/div[1]/div[2]/div/div
sleep 1
click id=interceptionadd_allcancelobject
sleep 1
Ip_Range_Create
[Arguments] ${j} ${ip}
sleep 1
: FOR ${i} IN RANGE 1 ${j}
\ sleep 1
\ click id=addIPList
\ sleep 1
\ input id=ip_input${i} ${ip}[${i}]
\ sleep 1
2020-07-21 19:20:50 +08:00
Ip_Range_Edit_Create
[Arguments] ${j} ${ip}
sleep 1
2020-07-21 19:20:50 +08:00
: FOR ${i} IN RANGE ${j}
\ sleep 1
\ click id=addIPList
\ sleep 1
\ input id=ip_input${i} ${ip}[${i}]
\ sleep 1
sleep 1
Switch_GeoName
[Arguments] ${GeoName}
sleep 2
2020-07-21 19:20:50 +08:00
click id=clear_input_btm
sleep 1
input id=one-input ${GeoName}
sleep 1
click id=select_new_search_btn
sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 1
Delete_IP_Libraries
[Arguments] ${GeoName}
2020-07-21 19:20:50 +08:00
Switch_GeoName ${GeoName}
sleep 2
click id=tagDel
sleep 2
click xpath=/html/body/div/div/div[3]/button[2]
sleep 2
Switch_GeoName1
[Arguments] ${GeoName}
sleep 2
2020-07-21 19:20:50 +08:00
click id=clear_input_btm
sleep 1
click id=one-input
sleep 1
click id=input_list_li1
sleep 1
input id=sreach_input ${GeoName}
sleep 1
click id=select_new_search_btn
sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 1
${GeoNameText} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 2
Should Be Equal As Strings ${GeoNameText} ${GeoName} #断言
Switch_Country
[Arguments] ${Country}
sleep 2
2020-07-21 19:20:50 +08:00
click id=clear_input_btm
sleep 1
click id=one-input
sleep 1
click id=input_list_li2
sleep 1
input id=sreach_input ${Country}
sleep 1
click id=select_new_search_btn
sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 1
${CountryText} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[3]/div/div/div
sleep 2
Should Match ${CountryText} ${Country} #断言
Switch_City
[Arguments] ${City}
sleep 2
2020-07-21 19:20:50 +08:00
click id=clear_input_btm
sleep 1
click id=one-input
sleep 1
click id=input_list_li3
sleep 1
input id=sreach_input ${City}
sleep 1
click id=select_new_search_btn
sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 1
${CCityText} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[4]/div/div/div
sleep 2
2020-07-21 19:20:50 +08:00
Should Match ${CityText} ${City} #断言
Pages
[Arguments]
Sleep 1
click id=children5 #点击一级目录Settings
Sleep 1
click id=sidebarIP_Libraries #点击二级目录IP_Libraries
Sleep 2
Ui-Pages
[Arguments] ${pages}
click element xpath=//*[@id="app"]/div/div[3]/div/div/div[3]/div[4]/div/ul/li[1]
2020-07-21 19:20:50 +08:00
sleep 2
click element xpath=//*[@id="app"]/div/div[3]/div/div/div[3]/div[4]/div/button[2]/i
2020-07-21 19:20:50 +08:00
sleep 2
Clear Element Text xpath=//*[@id="app"]/div/div[3]/div/div/div[3]/div[4]/div/span[2]/div/input
2020-07-21 19:20:50 +08:00
sleep 2
input text xpath=//*[@id="app"]/div/div[3]/div/div/div[3]/div[4]/div/span[2]/div/input ${pages}
2020-07-21 19:20:50 +08:00
sleep 2
press keys xpath=//*[@id="app"]/div/div[3]/div/div/div[3]/div[4]/div/span[2]/div/input ENTER
2020-07-21 19:20:50 +08:00
sleep 2
ALL
[Arguments]
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[5]/div/div/div/div/div[2]/div[7]
sleep 2
click element xpath=//*[@id="policy_IP_library1"]/div/p/i
sleep 2
DeleteKeyrings_del
sleep 2
click id=Keyrings_del
sleep 2
click xpath=/html/body/div/div/div[3]/button[2]
sleep 2
DeletehijackDel
sleep 2
click id=hijackDel
sleep 2
click xpath=/html/body/div/div/div[3]/button[2]
sleep 2
DeleteresinseDel
sleep 2
click id=resinseDel
sleep 2
click xpath=/html/body/div/div/div[3]/button[2]
sleep 2
Deletessl_del
sleep 2
click id=ssl_del
sleep 2
click xpath=/html/body/div/div/div[3]/button[2]
sleep 2
DeletetrafficMirrorDel
sleep 2
click id=trafficMirrorDel
sleep 2
click xpath=/html/body/div/div/div[3]/button[2]
sleep 2
DeleteAuthorities_del
sleep 2
click id=Authorities_del
sleep 2
click xpath=/html/body/div/div/div[3]/button[2]
sleep 2
Policy_Verify_Switch
[Arguments] ${Protocol}
sleep 1
input xpath=//*[@id="objectName_seach"] ${Protocol}
press keys xpath=//*[@id="objectName_seach"] ENTER
sleep 1