1、提交修改安全地理关键字2、提交源和目的公共关键字3、提交tcp关键字和用例dome

This commit is contained in:
lyf
2021-02-05 17:50:26 +08:00
parent e9e426f785
commit 37b03123eb
9 changed files with 847 additions and 966 deletions

View File

@@ -38,7 +38,7 @@ Create-action
Create-Source-Button
[Documentation] 点击Source的加号
sleep 2
sleep 2
click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4]/div[1]/div/div
Create-Destination-Button
@@ -71,95 +71,70 @@ HttpOrDoh
... AND click element id=interceptionadd_checkappshow0
... AND sleep 1
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[7]/div[3]/div/button
Create-Filter-judge
[Arguments] ${Application}=null ${Filter}=null ${Hostname}=null ${URLname}=null ${Request Headername}=null ${Response Headername}=null ${Request Contentname}=null
... ${Response Contentname}=null ${SSLSNIname}=null ${CNname}=null ${SANname}=null ${QNAMEname}=null ${Subjectname}=null ${MAILContentname}=null ${Attachment Namename}=null
... ${Attachment Contentname}=null ${Fromname}=null ${Toname}=null ${MAILAccountname}=null ${URIname}=null ${FTPContentname}=null ${FTPAccountname}=null ${QUICSNIname}=null
[Documentation] 调用次关键字前需要添加必填参数:
... ${Application}:填入是Application的内容例如SSL或HTTP
... ${Filter}:是一个列表列表中填入filter类型例如Host或URL等
... name:各个对象名称的列表
... 判断filter是否可以点击
${class}= Get Element Attribute xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[8]/div[1]/div/div[1] class
run keyword if "${class}"=="addobject addobject-long-list obj-content-null filter-width-style cursor addobject-long-list-disabled" log filter不可点击不可添加filter
run keyword if "${class}"=="addobject addobject-long-list obj-content-null filter-width-style cursor" run keywords sleep 1
... AND Create-Filter ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname}
... ${Response Contentname} ${SSLSNIname} ${CNname} ${SANname} ${QNAMEname} ${Subjectname} ${MAILContentname} ${Attachment Namename}
... ${Attachment Contentname} ${Fromname} ${Toname} ${MAILAccountname} ${URIname} ${FTPContentname} ${FTPAccountname} ${QUICSNIname}
Create-Filter
[Arguments] ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname}
... ${Response Contentname} ${SSLSNIname} ${CNname} ${SANname} ${QNAMEname} ${Subjectname} ${MAILContentname} ${Attachment Namename}
... ${Attachment Contentname} ${Fromname} ${Toname} ${MAILAccountname} ${URIname} ${FTPContentname} ${FTPAccountname} ${QUICSNIname}
[Arguments] ${Application}=null ${Filter}=null ${Hostname}=null ${URLname}=null ${Request Headername}=null ${Response Headername}=null ${Request Contentname}=null
... ${Response Contentname}=null ${QNAMEname}=null ${DohHostname}=null
[Documentation] 调用次关键字前需要添加必填参数:
... ${Application}:填入是Application的内容例如SSL或HTTP
... ${Filter}:是一个列表列表中填入filter类型例如Host或URL等
... name:各个对象名称的列表
... 判断添加filter类型
... 判断添加filter类型 xpath=//*[@id="policy_paper_left"]/div[8]/div/div[1]/label[contains(text(), "${filter}")]/following-sibling::div/div //*[@id="interceptionadd_checkappshow0"][contains(text(), "${filter}")]
sleep 2
FOR ${i} IN @{Filter}
sleep 1
click element id=interceptionadd_add_filter
sleep 1
run keyword if "${Application}"=="HTTP" and "${i}"=="Host" run keywords sleep 1
... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[1]
... AND click element xpath=//*[@id="interceptionadd_checkappshow0"][contains(text(), "${i}")]
... AND Create-Object-Search ${Hostname} ${i}
run keyword if "${Application}"=="HTTP" and "${i}"=="URL" run keywords sleep 1
... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[2]
... AND click element xpath=//*[@id="interceptionadd_checkappshow1"][contains(text(), "${i}")]
... AND Create-Object-Search ${URLname} ${i}
run keyword if "${Application}"=="HTTP" and "${i}"=="Request Header" run keywords sleep 1
... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[3]
... AND click element xpath=//*[@id="interceptionadd_checkappshow2"][contains(text(), "${i}")]
... AND Create-Object-Search ${Request Headername} ${i}
run keyword if "${Application}"=="HTTP" and "${i}"=="Response Header" run keywords sleep 1
... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[4]
... AND click element xpath=//*[@id="interceptionadd_checkappshow3"][contains(text(), "${i}")]
... AND Create-Object-Search ${Response Headername} ${i}
run keyword if "${Application}"=="HTTP" and "${i}"=="Request Content" run keywords sleep 1
... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[5]
... AND click element xpath=//*[@id="interceptionadd_checkappshow4"][contains(text(), "${i}")]
... AND Create-Object-Search ${Request Contentname} ${i}
run keyword if "${Application}"=="HTTP" and "${i}"=="Response Content" run keywords sleep 1
... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[6]
... AND click element xpath=//*[@id="interceptionadd_checkappshow5"][contains(text(), "${i}")]
... AND Create-Object-Search ${Response Contentname} ${i}
run keyword if "${Application}"=="Doh" and "${i}"=="Host" run keywords sleep 1
... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[1]
... AND click element xpath=//*[@id="interceptionadd_checkappshow0"][contains(text(), "${i}")]
... AND Create-Object-Search ${DohHostname} ${i}
run keyword if "${Application}"=="Doh" and "${i}"=="QNAME" run keywords sleep 1
... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[2]
... AND click element xpath=//*[@id="interceptionadd_checkappshow1"][contains(text(), "${i}")]
... AND Create-Object-Search ${QNAMEname} ${i}
END
Deny-subaction
[Arguments] ${action}=null ${subaction}=null ${code}=null ${Content}=null ${block-text}=null ${SearchorCreate}=null
... ${ProfileName}=null ${file}=null ${QType}=null ${Avalue}=null ${Attl}=null ${CNAMEvalue}=null ${CNAMEttl}=null
[Arguments] ${action} ${denycode}
[Documentation] 调用次关键字前需要添加必填参数:
... ${code}:填入403或404
... ${Content}:填入TEXT或Profile
... ${SearchorCreate}:填入Search或Create
... ${block-text}:填入TEXT文本框内容
... ${ProfileName}:Profile的名字
... ${file}:上传文件路径
... ${QType}:填入A或AAAA
... ${Avalue}:根据${QType}填入IPV4或IPV6的值
... ${Attl}:根据${QType}填入A的ttl值或AAAA的ttl值
... ${CNAMEvalue}:根据${QType}填入A的CNAME的域名值或AAAA的CNAME域名值
... ${CNAMEttl}:根据${QType}填入A的CNAME的ttl值或AAAA的CNAME的ttl值
... ${denycode}:填入403或404或451
... ${action}:填入deny
... 添加subaction
run keyword if "${action}"=="deny" and "${denycode}"=="403" run keywords sleep 1
... AND click element id=manipulation_select_addAction
... AND sleep 1
... AND click element xpath=/html/body/div[10]/div[1]/div[1]/ul/li[1]
... AND click element //span[.="${denycode}"]
... AND sleep 1
run keyword if "${action}"=="deny" and "${subaction}"=="404" run keywords sleep 1
run keyword if "${action}"=="deny" and "${denycode}"=="404" run keywords sleep 1
... AND click element id=manipulation_select_addAction
... AND sleep 1
... AND click element xpath=/html/body/div[10]/div[1]/div[1]/ul/li[2]
... AND click element //span[.="${denycode}"]
... AND sleep 1
run keyword if "${action}"=="deny" and "${subaction}"=="451" run keywords sleep 1
run keyword if "${action}"=="deny" and "${denycode}"=="451" run keywords sleep 1
... AND click element id=manipulation_select_addAction
... AND sleep 1
... AND click element xpath=/html/body/div[10]/div[1]/div[1]/ul/li[2]
... AND click element //span[.="${denycode}"]
... AND sleep 1
... AND
Deny-content
[Arguments] ${contenttype} ${SearchorCreate} ${ProfileName} ${file}
[Arguments] ${contenttype}=File ${SearchorCreate}=null ${ProfileName}=null ${file}=null ${textvalue}=null
[Documentation] 调用次关键字前需要添加必填参数:
... ${code}:填入403或404
... ${Content}:填入TEXT或Profile
@@ -167,9 +142,9 @@ Deny-content
... ${block-text}:填入TEXT文本框内容
... ${ProfileName}:Profile的名字
... ${file}:上传文件路径
... ${textvalue}:填入text输入框内容
... 添加block数据内容
sleep 1
click element id=denyUserRegionBlock_code
run keyword if "${contenttype}"=="File" run keywords sleep 1
... AND click element id=manipulation_select_blockInfo
... AND sleep 1
@@ -178,6 +153,13 @@ Deny-content
... AND click element id=manipulation_select_htmlProfile
... AND sleep 1
... AND Profile-SearchorCreate ${SearchorCreate} ${ProfileName} ${file}
run keyword if "${contenttype}"=="Text" run keywords sleep 1
... AND click element id=manipulation_select_blockInfo
... AND sleep 1
... AND click ellement id=ResponseContentText
... AND sllep 1
... AND input text id=manipulation_elInput_blockselect ${textvalue}
... AND sleep 1
Profile-SearchorCreate
[Arguments] ${SearchorCreate} ${ProfileName} ${file}
[Documentation] 调用次关键字前需要添加必填参数:
@@ -186,8 +168,6 @@ Profile-SearchorCreate
... ${file}:上传文件路径
... 判断是新建还是搜索profile
sleep 1
click element id=html_profile
sleep 1
run keyword if "${SearchorCreate}"=="Search" run keywords sleep 1
... AND input text xapth=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ${ProfileName}
... AND sleep 1
@@ -202,7 +182,7 @@ Profile-SearchorCreate
... AND sleep 1
... AND Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${file} #上传文件
... AND sleep 1
... AND clcik element id=responseAddOk1
... AND click element id=responseAddOk1
... AND sleep 1
... ELSE log 传入参数错误
Deny-Redirect
@@ -436,7 +416,7 @@ Enabled
... AND click element xpath=/html/body/div/div/div[3]/button[2]
... ELSE log 开启日志
Security-Policies-OK
Proxy-Policies-OK
sleep 1
click element id=proxyManipulationSuccess
sleep 1
@@ -444,9 +424,9 @@ Create-Object-Search
[Arguments] ${name} ${filter}
[Documentation] 调用次关键字前需要添加必填参数:
... ${name}:填入是一个列表列表内容为object的name
... 选择search对象
... 选择search对象
sleep 1
click element xpath=//*[@id="policy_paper_left"]/div[8]/div/div[1]/label[contains(text(), "${filter}")]/following-sibling::div/div
click element xpath=//*[@id="policy_paper_left"]/div[9]/div/div[1]/label[contains(text(), "${filter}")]/following-sibling::div/div
sleep 1
FOR ${i} IN @{name}
input text xpath=//*[@id="condistions_protocol"]/div[2]/p[contains(text(), "${filter}")]/following-sibling::div[2]/div/div[1]/input ${i}
@@ -457,391 +437,10 @@ Create-Object-Search
sleep 1
END
Create-Source
[Arguments] ${type1}=null ${CreateOrSearch}=null ${Add}=null ${name}=null
... ${object_name}=null ${ipclienttext1}=null ${post}=null ${Country}=null ${City}=null
... ${Protocols1}=null ${Degree}=null ${times}=null ${numbers}=null ${limits}=null ${keywordtext}=null
[Documentation] 调用次关键字前需要添加必填参数:
... ${type1}:填入Ip或SUBID或Geography或IPLearning
... ${CreateOrSearch}:填入Create或者Search
... ${Add}:填入Address或Group
... ${name}:名称
... ${ip_type}:填入Ip或者Geography或者IPLearning
... ${ipclienttext1}:填入IPV4或6的值或range的ip段
... ${post}:填入端口
... ${Country}:列表形式,列表中是国家名字
... ${City}:列表形式,列表中是城市名字
... ${Protocols1}:填入HTTP或SSL或HTTPSSL
... ${Degree}:填入1Degree或2Degree
... ${times}:填入小时数例如1或2
... ${numbers}:填入数值例如1或10000
... ${limits}:填入数值例如1或10000
... ${object_name}:列表形式,列表中是对象的名字
... ${keywordtext}:填入新建subid的内容
... 判断新建source选择用什么样的类型数据
run keyword if "${type1}"=="Ip" run keywords sleep 2
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4]/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[1]
... AND sleep 1
... AND sleep 1
... AND SourceIPCreateOrSearch ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
... ELSE IF "${type1}"=="SUBID" run keywords sleep 2
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4]/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[2]
... AND sleep 1
... AND SUBIDCreateOrSearch ${name} ${keywordtext} ${object_name}
... ELSE IF "${type1}"=="Geography" run keywords sleep 2
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4]/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[3]
... AND sleep 1
... AND SourceIPCreateOrSearch ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
... ELSE IF "${type1}"=="IPLearning" run keywords sleep 2
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4]/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[4]
... AND sleep 1
... AND SourceIPCreateOrSearch ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
Create-Destination
[Arguments] ${type1}=null ${CreateOrSearch}=null ${Add}=null ${name}=null
... ${object_name}=null ${ipclienttext1}=null ${post}=null ${Country}=null ${City}=null
... ${Protocols1}=null ${Degree}=null ${times}=null ${numbers}=null ${limits}=null ${keywordtext}=null
[Documentation] 调用次关键字前需要添加必填参数:
... ${type1}:填入Ip或SUBID或Geography或IPLearning
... ${CreateOrSearch}:填入Create或者Search
... ${Add}:填入Address或Group
... ${name}:名称
... ${ip_type}:填入Ip或者Geography或者IPLearning
... ${ipclienttext1}:填入IPV4或6的值或range的ip段
... ${post}:填入端口
... ${Country}:列表形式,列表中是国家名字
... ${City}:列表形式,列表中是城市名字
... ${Protocols1}:填入HTTP或SSL或HTTPSSL
... ${Degree}:填入1Degree或2Degree
... ${times}:填入小时数例如1或2
... ${numbers}:填入数值例如1或10000
... ${limits}:填入数值例如1或10000
... ${object_name}:列表形式,列表中是对象的名字
... ${keywordtext}:填入新建subid的内容
... 判断新建source选择用什么样的类型数据
run keyword if "${type1}"=="Ip" run keywords sleep 1
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[1]
... AND sleep 1
... AND sleep 1
... AND DestinationIPCreateOrSearch ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
... ELSE IF "${type1}"=="Geography" run keywords sleep 1
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[3]
... AND sleep 1
... AND DestinationIPCreateOrSearch ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
... ELSE IF "${type1}"=="IPLearning" run keywords sleep 1
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[4]
... AND sleep 1
... AND DestinationCreateOrSearch ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
SourceIPCreateOrSearch
[Arguments] ${CreateOrSearch} ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1}
... ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
[Documentation] 调用次关键字前需要添加必填参数:
... ${CreateOrSearch}:填入Create或者Search
... ${Add}:填入Address或Group
... ${name}:名称
... ${ip_type}:填入Ip或者Geography或者IPLearning
... ${ipclienttext1}:填入IPV4或6的值或range的ip段
... ${post}:填入端口
... ${Country}:列表形式,列表中是国家名字
... ${City}:列表形式,列表中是城市名字
... ${Protocols1}:填入HTTP或SSL或HTTPSSL
... ${Degree}:填入1Degree或2Degree
... ${times}:填入小时数例如1或2
... ${numbers}:填入数值例如1或10000
... ${limits}:填入数值例如1或10000
... ${object_name}:列表形式,列表中是对象的名字
... 判断是新建ip还是搜索添加ip
run keyword if "${CreateOrSearch}"=="Create" run keywords sleep 1
... AND click element id=interceptionadd_proaddaddSource
... AND SourceIPAdd ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
... ELSE IF "${CreateOrSearch}"=="Search" run keywords sleep 1
... AND SourceSearchSearch ${object_name}
SUBIDCreateOrSearch
[Arguments] ${name} ${keywordtext} ${object_name}
[Documentation] 调用次关键字前需要添加必填参数:
... ${CreateOrSearch}:填入Create或者Search
... ${name}:名称
... ${keywordtext}:填入新建subid的内容
... ${object_name}:列表形式,列表中是对象的名字
... 判断是新建subid还是搜索添加subid
run keyword if "${CreateOrSearch}"=="Create" run keywords sleep 1
... AND click element id=interceptionadd_proaddaddSource
... AND SUBIDAdd ${Add} ${name} ${keywordtext} ${object_name}
... ELSE IF "${CreateOrSearch}"=="Search" run keywords sleep 1
... AND SourceSearchSearch ${object_name}
DestinationIPCreateOrSearch
[Arguments] ${CreateOrSearch} ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1}
... ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
[Documentation] 调用次关键字前需要添加必填参数:
... ${CreateOrSearch}:填入Create或者Search
... ${Add}:填入Address或Group
... ${name}:名称
... ${ip_type}:填入Ip或者Geography或者IPLearning
... ${ipclienttext1}:填入IPV4或6的值或range的ip段
... ${post}:填入端口
... ${Country}:列表形式,列表中是国家名字
... ${City}:列表形式,列表中是城市名字
... ${Protocols1}:填入HTTP或SSL或HTTPSSL
... ${Degree}:填入1Degree或2Degree
... ${times}:填入小时数例如1或2
... ${numbers}:填入数值例如1或10000
... ${limits}:填入数值例如1或10000
... ${object_name}:列表形式,列表中是对象的名字
... 判断是新建ip还是搜索添加ip
run keyword if "${CreateOrSearch}"=="Create" run keywords sleep 1
... AND click element id=interceptionadd_proaddaddDestination
... AND DestinationIPAdd ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
... ELSE IF "${CreateOrSearch}"=="Search" run keywords sleep 1
... AND DestinationSearch ${object_name}
SourceSearch
[Arguments] ${name}
[Documentation] 调用次关键字前需要添加必填参数:
... ${name}:填入是一个列表列表内容为source的name
... 选择search对象
FOR ${i} IN @{name}
input text xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4]/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ${i}
sleep 1
press keys xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4]/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ENTER
sleep 1
click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4]/div[2]/div[1]/div[2]/div[2]/div/div[2]/div/div/ul/li[1]
sleep 1
END
DestinationSearch
[Arguments] ${name}
[Documentation] 调用次关键字前需要添加必填参数:
... ${name}:填入是一个列表列表内容为source的name
... 选择search对象
FOR ${i} IN @{name}
input text xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ${i}
sleep 1
press keys xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ENTER
sleep 1
click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[1]/div[2]/div[2]/div/div[2]/div/div/ul/li[1]
sleep 1
END
SUBIDAdd
[Arguments] ${Add} ${name} ${keywordtext} ${object_name}
[Documentation] 调用次关键字前需要添加必填参数:
... ${Add}:填入Address或Group
... ${name}:名称
... ${keywordtext}:填入新建subid的内容
... ${object_name}:列表形式,列表中是对象的名字
... 判断是新建subid还是新建subid分组
run keyword if "${Add}"=="Address" run keywords sleep 1
... AND click element xpath=/html/body/ul/li[1]
... AND sleep 1
... AND SUBAddress ${name} ${keywordtext}
... ELSE IF "${Add}"=="Group" run keywords sleep 1
... AND click element xpath=/html/body/ul/li[2]
... AND sleep 1
... AND SUBGroupAdd ${name} ${object_name}
SUBAddress
[Arguments] ${name} ${keywordtext}
[Documentation] 调用次关键字前需要添加必填参数:
... ${name}:名称
... ${keywordtext}:填入新建subid的内容
... 新建subid
SourceCreate-name ${name}
click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div[1]/i
sleep 1
Create-SubscriberID-text ${keywordtext}
sleep 1
SUBGroupAdd
[Arguments] ${name} ${object_name}
[Documentation] 调用次关键字前需要添加必填参数:
... ${name}:名称
... ${object_name}:列表形式,列表中是对象的名字
... 新建subid分组
SourceCreate-name ${name}
click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
sleep 1
Create-Sub-Objects ${object_name}
NewObject.Create-ok
SourceIPAdd
[Arguments] ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
[Documentation] 调用次关键字前需要添加必填参数:
... ${Add}:填入Address或Group
... ${ip_type}:填入IP或者Geography或者IPLearning
... 判断是新建ip还是新建ip分组
run keyword if "${Add}"=="Address" run keywords sleep 1
... AND click element xpath=/html/body/ul/li[1]
... AND sleep 1
... AND SourceIPAddress ${name} ${ip_type} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
... ELSE IF "${Add}"=="Group" run keywords sleep 1
... AND click element xpath=/html/body/ul/li[2]
... AND sleep 1
... AND SourceIPGroupAdd ${name} ${ip_type} ${object_name}
SourceIPAddress
[Arguments] ${name} ${ip_type} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
[Documentation] 调用次关键字前需要添加必填参数:
... ${name}:名称
... ${ip_type}:填入Ip或者Geography或者IPLearning
... ${ipclienttext1}:填入IPV4或6的值或range的ip段
... ${post}:填入端口
... ${Country}:列表形式,列表中是国家名字
... ${City}:列表形式,列表中是城市名字
... ${Protocols1}:填入HTTP或SSL或HTTPSSL
... ${Degree}:填入1Degree或2Degree
... ${times}:填入小时数例如1或2
... ${numbers}:填入数值例如1或10000
... ${limits}:填入数值例如1或10000
... 判断 新建选择用什么样的类型,并进行新建
SourceCreate-name ${name}
sleep 1
run keyword if "${ip_type}"=="Ip" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div[1]
... AND sleep 1
... AND NewObject.Create-ip-ClientIP-text ${ipclienttext1} ${post}
run keyword if "${ip_type}"=="Geography" run keywords click element id=objectAdd_ip1
... AND sleep 1
... AND click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div[1]/div[2]
... AND sleep 1
... AND NewObject.Create-Geography ${Country} ${City}
... AND sleep 1
... AND click element id=interceptionadd_allcancelobjec3t
... AND sleep 1
run keyword if "${ip_type}"=="IPLearning" run keywords click element id=objectAdd_ip2
... AND sleep 1
... AND click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div[1]
... AND sleep 1
... AND input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div[4]/div/div[1]/div[2]/div[1]/div[1]/form/div[1]/div/div[1]/input ${fqdn}
... AND sleep 1
... AND click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[1]/div/div/div[2]
... AND sleep 1
... AND Learn-From-Protocols ${Protocols1}
... AND Learning-Depth ${Degree}
... AND sleep 1
... AND input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[3]/div/div[1]/input ${times}
... AND sleep 1
... AND input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[4]/div/div[1]/input ${numbers}
... AND sleep 1
... AND input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[5]/div/div[1]/input ${limits}
... AND sleep 1
sleep 1
SourceCreate-ok
DestinationIPAdd
[Arguments] ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
[Documentation] 调用次关键字前需要添加必填参数:
... ${Add}:填入Address或Group
... ${ip_type}:填入IP或者Geography或者IPLearning
... 判断是新建ip还是新建ip分组
run keyword if "${Add}"=="Address" run keywords sleep 1
... AND click element xpath=/html/body/ul[contains(@id,'dropdown-menu' )and @x-placement='bottom-start']/child::li[1]
... AND sleep 1
... AND DestinationIPAddress ${name} ${ip_type} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
... ELSE IF "${Add}"=="Group" run keywords sleep 1
... AND click element xpath=/html/body/ul[contains(@id,'dropdown-menu' )and @x-placement='bottom-start']/child::li[2]
... AND sleep 1
... AND IPGroupAdd ${name} ${ip_type} ${object_name}
DestinationIPAddress
[Arguments] ${name} ${ip_type} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
[Documentation] 调用次关键字前需要添加必填参数:
... ${name}:名称
... ${ip_type}:填入Ip或者Geography或者IPLearning
... ${ipclienttext1}:填入IPV4或6的值或range的ip段
... ${post}:填入端口
... ${Country}:列表形式,列表中是国家名字
... ${City}:列表形式,列表中是城市名字
... ${Protocols1}:填入HTTP或SSL或HTTPSSL
... ${Degree}:填入1Degree或2Degree
... ${times}:填入小时数例如1或2
... ${numbers}:填入数值例如1或10000
... ${limits}:填入数值例如1或10000
... 判断 新建选择用什么样的类型,并进行新建
DestinationCreate-name ${name}
sleep 1
run keyword if "${ip_type}"=="Ip" run keywords click element xpath=/html/body/div/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1]
... AND sleep 1
... AND NewObject.Create-ip-ClientIP-text ${ipclienttext1} ${post}
run keyword if "${ip_type}"=="Geography" run keywords click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div/label[2]
... AND sleep 1
... AND click element xpath=/html/body/div/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1]/div[2]
... AND sleep 1
... AND NewObject.Create-Geography ${Country} ${City}
... AND sleep 1
... AND click element id=interceptionadd_allcancelobjec3t
... AND sleep 1
run keyword if "${ip_type}"=="IPLearning" run keywords click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div/label[3]
... AND sleep 1
... AND click element xpath=/html/body/div/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1]
... AND sleep 1
... AND input text xpath=/html/body/div/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[3]/div/div[1]/div[2]/div[1]/div[1]/form/div[1]/div/div[1]/input ${fqdn}
... AND sleep 1
... AND click element xpath=/html/body/div/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[1]/div/div/div[2]
... AND sleep 1
... AND Learn-From-Protocols ${Protocols1}
... AND Learning-Depth ${Degree}
... AND sleep 1
... AND input text xpath=/html/body/div/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[3]/div/div[1]/input ${times}
... AND sleep 1
... AND input text xpath=/html/body/div/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[4]/div/div[1]/input ${numbers}
... AND sleep 1
... AND input text xpath=/html/body/div/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[5]/div/div[1]/input ${limits}
... AND sleep 1
DestinationCreate-ok
Learn-From-Protocols
[Arguments] ${Protocols1}
[Documentation] 调用次关键字前需要添加必填参数:
... ${Protocols1}:填入HTTP或SSL或者HTTPSSL
... 判断选择用什么样的协议
run keyword if "${Protocols1}"=="HTTP" run keywords sleep 1
... AND click element xpath=/html/body/div[6]/div[1]/div[1]/ul/li[1]
run keyword if "${Protocols1}"=="SSL" run keywords sleep 1
... AND click element xpath=/html/body/div[6]/div[1]/div[1]/ul/li[2]
run keyword if "${Protocols1}"=="HTTPSSL" run keywords sleep 1
... AND click element xpath=/html/body/div[6]/div[1]/div[1]/ul/li[1]
... AND sleep 1
... AND click element xpath=/html/body/div[6]/div[1]/div[1]/ul/li[2]
Learning-Depth
[Arguments] ${Degree}
[Documentation] 调用次关键字前需要添加必填参数:
... ${Degree}:填入1Degree或2Degree
... 判断是用1Degree或2Degree
run keyword if "${Degree}"=="1Degree" run keywords sleep 1
... AND click element xpath=/html/body/div/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[2]/div/div/label[1]
run keyword if "${Degree}"=="2Degree" run keywords sleep 1
... AND click element xpath=/html/body/div/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[2]/div/div/label[2]
SourceIPGroupAdd
[Arguments] ${name} ${ip_type} ${object_name}
[Documentation] 调用次关键字前需要添加必填参数:
... ${name}:名称
... ${ip_type}:填入Ip或者Geography
... ${object_name}:列表形式,列表中是对象的名字
SourceCreate-name ${name}
Select-ip_type ${ip_type}
sleep 1
click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div/div[2]
Create-Sub-Objects ${object_name}
NewObject.Create-ok
SourceCreate-name
[Arguments] ${objName}
sleep 2
input text id=objectAdd_name ${objName}
SourceCreate-ok
sleep 2
click button id=objectAdd_ok
DestinationCreate-name
[Arguments] ${objName}
sleep 2
input text xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[1]/div/div[1]/input ${objName}
DestinationCreate-ok
sleep 2
click button xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[2]/div[2]/div/div[2]/button[1]
Proxy-Source
[Arguments] ${SourceType} ${SourceValue}
Wait Until Element Is Enabled xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[1]/span/div/div/div[2]/div/div 10
sleep 3
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[1]/span/div/div/div[2]/div/div
sleep 1
run keyword if "${SourceType}"=="ID" run keywords sleep 1
@@ -895,10 +494,16 @@ Initialize-Policie
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form[1]/div/div[5]/div[1]/div/div/div/p/span/span/i[2]
... AND sleep 1
Delete-Proxy-estimate
[Arguments] ${securityname}
run keyword if "${securityname}"!="null" run keywords sleep 1
... AND Delete-Proxy ${securityname}
... ELSE log go on
Delete-Proxy
[Arguments] ${securityname}
Menu policys Security Policy
Menu policys Proxy Policy
sleep 2
Wait Until Element Is Enabled xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[1]/span/div/div/div[2]/div/div 10
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[1]/span/div/div/div[2]/div/div
@@ -917,6 +522,11 @@ Delete-Proxy
Run Keyword And Ignore Error click element xpath=/html/body/div/div/div[3]/button[2]
sleep 1
Delete-object-estimate
[Arguments] ${obj}
run keyword if "${obj}"!="null" run keywords sleep 1
... AND Delete-object ${obj}
... ELSE log go on
Delete-object
[Arguments] ${obj}
FOR ${num} ${key} IN ENUMERATE @{obj}
@@ -944,4 +554,4 @@ Forname
sleep 1
Run Keyword And Ignore Error click element xpath=/html/body/div/div/div[3]/button[2]
sleep 1
END
END