新增安全代理策略测试用例,修改创建策略关键字
This commit is contained in:
205
01-TestCase/tsg_ui/ui_proxy/ProxyCase.robot
Normal file
205
01-TestCase/tsg_ui/ui_proxy/ProxyCase.robot
Normal file
@@ -0,0 +1,205 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui Policies Proxy
|
||||
Library Selenium2Library
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/NewObjectPages.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/NewObject.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/Menu.robot
|
||||
Resource ../../../03-Variable/PolicyObjectDefault.txt
|
||||
Resource ../../../02-Keyword/tsg_ui/policy/UIPolicy.robot
|
||||
|
||||
*** Test Cases ***
|
||||
|
||||
CreateProxyAllow
|
||||
[Tags] Positive UI Proxy Policies Allow
|
||||
CreatePage FQDN single ProxyFQDN keywordtext=*travelgam.com
|
||||
CreatePage URL single ProxyURL keywordtext=*travelgam.com
|
||||
CreatePage HTTPSignature single ProxyHTTPSignature reqrestype=req reqresheader=ck keywordtext=1234@#%
|
||||
${ip_name1} create list Proxy_IP
|
||||
${filter} create list Host URL Request Header Response Header
|
||||
${Host} create list ProxyFQDN
|
||||
${URL} create list ProxyURL
|
||||
${Request Header} create list ProxyHTTPSignature
|
||||
${Response Header} create list ProxyHTTPSignature
|
||||
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header}
|
||||
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${destinationAddIpList} Create List ${dip1}
|
||||
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Create Add=Address Name=Proxy_IP Ipclienttext1=192.168.40.11-192.168.40.110 Port=1-65535
|
||||
${sourceAddIpList} Create List ${sip}
|
||||
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Allow ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} DestinationInfo=${destinationInfo} FilterInfo=${filterInfo}
|
||||
PoliciesDelete
|
||||
|
||||
CreateProxyDeny
|
||||
[Tags] Positive UI Proxy Policies Deny
|
||||
CreatePage Key single proxykey keywordtext=Poplar Systems
|
||||
${httpsignature} set variable ProxyHTTPSignature
|
||||
${Key} set variable proxykey
|
||||
${ip_name1} create list Proxy_IP
|
||||
${filter} create list Host URL Request Header Response Header Request Content Response Content
|
||||
${Host} create list ProxyFQDN
|
||||
${URL} create list ProxyURL
|
||||
${Request Header} create list ${httpsignature}
|
||||
${Response Header} create list ${httpsignature}
|
||||
${Request Content} create list ${Key}
|
||||
${Response Content} create list ${Key}
|
||||
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header} Request Contentname=${Request Content} Response Contentname=${Response Content}
|
||||
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${destinationAddIpList} Create List ${dip1}
|
||||
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${sourceAddIpList} Create List ${sip}
|
||||
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Deny ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||
${ProxyDenyadd} Create Dictionary DenyCode=403 Action=Deny ContentType=TEXT TextValue=Test
|
||||
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo} ProxyDenyadd=${ProxyDenyadd}
|
||||
PoliciesDelete
|
||||
|
||||
CreateProxyMonitor
|
||||
[Tags] Positive UI Proxy Policies Monitor
|
||||
${httpsignature} set variable ProxyHTTPSignature
|
||||
${Key} set variable proxykey
|
||||
${ip_name1} create list Proxy_IP
|
||||
${filter} create list Host URL Request Header Response Header Request Content Response Content
|
||||
${Host} create list ProxyFQDN
|
||||
${URL} create list ProxyURL
|
||||
${Request Header} create list ${httpsignature}
|
||||
${Response Header} create list ${httpsignature}
|
||||
${Request Content} create list ${Key}
|
||||
${Response Content} create list ${Key}
|
||||
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header} Request Contentname=${Request Content} Response Contentname=${Response Content}
|
||||
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${destinationAddIpList} Create List ${dip1}
|
||||
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${sourceAddIpList} Create List ${sip}
|
||||
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Monitor ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo}
|
||||
PoliciesDelete
|
||||
|
||||
CreateProxyRedirect
|
||||
[Tags] Positive UI Proxy Policies Redirect
|
||||
${httpsignature} set variable ProxyHTTPSignature
|
||||
${Key} set variable proxykey
|
||||
${ip_name1} create list Proxy_IP
|
||||
${filter} create list Host URL Request Header Response Header Request Content
|
||||
${Host} create list ProxyFQDN
|
||||
${URL} create list ProxyURL
|
||||
${Request Header} create list ${httpsignature}
|
||||
${Response Header} create list ${httpsignature}
|
||||
${Request Content} create list ${Key}
|
||||
${HTTPRedirectadd} Create Dictionary Response Code=301 Redirect URL=https://www.vip.com
|
||||
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header} Request Contentname=${Request Content}
|
||||
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${destinationAddIpList} Create List ${dip1}
|
||||
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${sourceAddIpList} Create List ${sip}
|
||||
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Redirect ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo} HTTPRedirectadd=${HTTPRedirectadd}
|
||||
PoliciesDelete
|
||||
|
||||
CreateProxyReplace
|
||||
[Tags] Positive UI Proxy Policies Replace
|
||||
${httpsignature} set variable ProxyHTTPSignature
|
||||
${ip_name1} create list Proxy_IP
|
||||
${filter} create list Host URL Request Header Response Header
|
||||
${Host} create list ProxyFQDN
|
||||
${URL} create list ProxyURL
|
||||
${Request Header} create list ${httpsignature}
|
||||
${Response Header} create list ${httpsignature}
|
||||
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header}
|
||||
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${destinationAddIpList} Create List ${dip1}
|
||||
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${sourceAddIpList} Create List ${sip}
|
||||
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Replace ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||
${ParametersType} create list HTTP Request-URI
|
||||
${ReplaceActionParameters} Create Dictionary ParametersType=${ParametersType} RequestURIFind=test RequestURIReplacewith=TEXT
|
||||
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo} ReplaceActionParameters=${ReplaceActionParameters}
|
||||
PoliciesDelete
|
||||
|
||||
CreateProxyHijack
|
||||
[Tags] Positive UI Proxy Policies Hijack
|
||||
${httpsignature} set variable ProxyHTTPSignature
|
||||
${ip_name1} create list Proxy_IP
|
||||
${filter} create list Host URL Request Header Response Header
|
||||
${Host} create list ProxyFQDN
|
||||
${URL} create list ProxyURL
|
||||
${Request Header} create list ${httpsignature}
|
||||
${Response Header} create list ${httpsignature}
|
||||
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header}
|
||||
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${destinationAddIpList} Create List ${dip1}
|
||||
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${sourceAddIpList} Create List ${sip}
|
||||
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Hijack ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||
${HijackFileadd} Create Dictionary SearchorCreate=Search Hijackname=by自动化测试勿动
|
||||
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo} HijackFileadd=${HijackFileadd}
|
||||
PoliciesDelete
|
||||
|
||||
CreateProxyInsert
|
||||
[Tags] Positive UI Proxy Policies Insert
|
||||
${httpsignature} set variable ProxyHTTPSignature
|
||||
${ip_name1} create list Proxy_IP
|
||||
${filter} create list Host URL Request Header Response Header
|
||||
${Host} create list ProxyFQDN
|
||||
${URL} create list ProxyURL
|
||||
${Request Header} create list ${httpsignature}
|
||||
${Response Header} create list ${httpsignature}
|
||||
${filterInfo} Create Dictionary Filter=${filter} Hostname=${Host} URLname=${URL} Request Headername=${Request Header} Response Headername=${Response Header}
|
||||
${dip1} Create Dictionary Sordtype=Destination Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${destinationAddIpList} Create List ${dip1}
|
||||
${destinationInfo} Create Dictionary destinationAddIpList=${destinationAddIpList}
|
||||
${sip} Create Dictionary Sordtype=Source Type1=Ip CreateOrSearch=Search ObjectName=${ip_name1}
|
||||
${sourceAddIpList} Create List ${sip}
|
||||
${sourceInfo} Create Dictionary sourceAddIpList=${sourceAddIpList}
|
||||
${policyInfo} Create Dictionary PolicyType=Proxy Policy PolicyName=${TEST NAME} PolicyAction=Insert ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||
${InsertScript} Create Dictionary SearchorCreate=Search Insertname=自动化-勿动
|
||||
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} FilterInfo=${filterInfo} InsertScript=${InsertScript}
|
||||
PoliciesDelete
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui Policies Security
|
||||
Library Selenium2Library
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/NewObjectPages.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/objects/NewObject.robot
|
||||
@@ -421,18 +422,3 @@ CreateSecurityIntercept
|
||||
${policyInfo} Create Dictionary PolicyType=Security Policy PolicyName=${TEST NAME} PolicyAction=Intercept ApplicationSearch=SSL PolicyLogSession=1 PolicyEnabled=1
|
||||
UIAddPolicies ${policyInfo} SourceInfo=${sourceInfo} DestinationInfo=${destinationInfo} FilterInfo=${filterInfo}
|
||||
PoliciesDelete
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ Resource ../../../03-Variable/BifangApiVariable.txt
|
||||
|
||||
UIAddPolicies
|
||||
[Arguments] ${PolicyInfo} ${SourceInfo}=null ${DestinationInfo}=null ${FilterInfo}=null ${Subactionadd}=null ${Keyring}=null ${MirrorDecryptedTrafficInfo}=null ${DecryptionProfile}=null
|
||||
... ${ProxyDenyadd}=null ${DenyRedirectadd}=null ${ReplaceActionParameters}=null ${HijackFileadd}=null ${InsertScript}=null
|
||||
... ${ProxyDenyadd}=null ${DenyRedirectadd}=null ${HTTPRedirectadd}=null ${ReplaceActionParameters}=null ${HijackFileadd}=null ${InsertScript}=null
|
||||
[Documentation] 创建策略
|
||||
... 调用次关键字前需要添加参数:
|
||||
... ${PolicyInfo}是个字典:实例 ${PolicyInfo} Create Dictionary PolicyType=Security Policy PolicyName=${TEST NAME} PolicyAction=deny PolicySubAction=RST ApplicationSearch=HTTP PolicyLogSession=1 PolicyEnabled=1
|
||||
@@ -81,15 +81,17 @@ UIAddPolicies
|
||||
UIPolicy.Create-Application-Button ${PolicyType} ${ApplicationSearchV} ${PolicyAction}
|
||||
#编辑filter
|
||||
Run Keyword If "${FilterInfo}"=="null" log there is no FilterInfo
|
||||
... ELSE Create-Filter-SecurityOrProxy ${PolicyType} ${ApplicationSearchV}[0] ${FilterInfo}
|
||||
... ELSE Create-Filter-SecurityOrProxy ${PolicyType} ${ApplicationSearchV}[0] ${FilterInfo} ${PolicyAction}
|
||||
Run Keyword If "${PolicyType}"=="Security Policy" and "${PolicyAction}"=="Deny" run keywords sleep ${sleep}
|
||||
... AND Deny-subaction-1 ${PolicyAction} ${PolicySubAction} ${Subactionadd}
|
||||
Run Keyword If "${PolicyType}"=="Security Policy" and "${PolicyAction}"=="intercept" and "${ApplicationSearchV}"=="SSL" run keywords sleep ${sleep}
|
||||
... AND Interceptadd ${Keyring} ${MirrorDecryptedTrafficInfo} ${DecryptionProfile}
|
||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Deny" run keywords sleep ${sleep}
|
||||
... AND Proxy-Deny ${ProxyDenyadd}
|
||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Redirect" run keywords sleep ${sleep}
|
||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Redirect" and "${ApplicationSearch}" == "DoH" run keywords sleep ${sleep}
|
||||
... AND Deny-Redirect ${DenyRedirectadd}
|
||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Redirect" and "${ApplicationSearch}" == "HTTP" run keywords sleep ${sleep}
|
||||
... AND ProxyHTTPRedirect ${HTTPRedirectadd}
|
||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Replace" run keywords sleep ${sleep}
|
||||
... AND Replace-Action-Parameters-for1 ${ReplaceActionParameters}
|
||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Hijack" run keywords sleep ${sleep}
|
||||
@@ -497,7 +499,7 @@ Create-name
|
||||
run keyword if "${PolicyType}"=="Security Policy" run keywords sleep ${sleep}
|
||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[2]/label[contains(text(), "Name")]/following-sibling::div/div/input ${Name}
|
||||
run keyword if "${PolicyType}"=="Proxy Policy" run keywords sleep ${sleep}
|
||||
... AND input text id=manipulation_elInput_policyName ${Name}
|
||||
... AND input text id=manipulation_elInput_policyName1 ${Name}
|
||||
Create-actions
|
||||
[Arguments] ${PolicyType} ${Action}
|
||||
sleep ${sleep}
|
||||
@@ -606,7 +608,7 @@ ProxyApplicationSearch
|
||||
[Documentation] 调用次关键字前需要添加必填参数:
|
||||
... ${Action}:填入是action的内容,例如redirect或deny
|
||||
... 选择search对象
|
||||
run keyword if "${Action}"=="redirect" run keywords sleep ${sleep}
|
||||
run keyword if "${Action}"=="Redirect" run keywords sleep ${sleep}
|
||||
... AND click element id=interceptionadd_application
|
||||
... AND sleep ${sleep}
|
||||
... AND HttpOrDoh ${HttpOrDoh}
|
||||
@@ -616,16 +618,17 @@ HttpOrDoh
|
||||
[Documentation] 调用次关键字前需要添加必填参数:
|
||||
... ${HttpOrDoh}:填入是Application的内容,例如Doh或HTTP
|
||||
... 选择search对象
|
||||
${HttpOrDoh} set variable ${HttpOrDoh}[0]
|
||||
run keyword if "${HttpOrDoh}"=="HTTP" run keywords sleep ${sleep}
|
||||
... AND click element id=interceptionadd_checkappshow1
|
||||
... AND sleep ${sleep}
|
||||
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[7]/div[3]/div/button
|
||||
... ELSE IF "${HttpOrDoh}"=="Doh" run keywords sleep ${sleep}
|
||||
... ELSE IF "${HttpOrDoh}"=="DoH" run keywords sleep ${sleep}
|
||||
... AND click element id=interceptionadd_checkappshow0
|
||||
... AND sleep ${sleep}
|
||||
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[7]/div[3]/div/button
|
||||
Create-Filter-SecurityOrProxy
|
||||
[Arguments] ${PolicyType} ${Application} ${addFilter}
|
||||
[Arguments] ${PolicyType} ${Application} ${addFilter} ${PolicyAction}
|
||||
[Documentation] 点击Application的加号
|
||||
${return} ${Filter} Run Keyword And Ignore Error Get From Dictionary ${addFilter} Filter
|
||||
${Filter} Run Keyword If "${return}"=="FAIL" or "${Filter}"=="${EMPTY}" set variable null
|
||||
@@ -699,8 +702,8 @@ Create-Filter-SecurityOrProxy
|
||||
run keyword if "${PolicyType}"=="Security Policy" Create-SecurityFilter-judge ${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}
|
||||
run keyword if "${PolicyType}"=="Proxy Policy" Create-ProxyFilter ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname}
|
||||
... ${Response Contentname} ${QNAMEname} ${DohHostname}
|
||||
run keyword if "${PolicyType}"=="Proxy Policy" and "${PolicyAction}" == "Redirect" Create_Proxy_RedirectFilter ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname} ${Response Contentname} ${QNAMEname} ${DohHostname}
|
||||
... ELSE Create-ProxyFilter ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname} ${Response Contentname} ${QNAMEname} ${DohHostname}
|
||||
|
||||
Create-SecurityFilter-judge
|
||||
[Arguments] ${Application}=null ${Filter}=null ${Hostname}=null ${URLname}=null ${Request Headername}=null ${Response Headername}=null ${Request Contentname}=null
|
||||
@@ -803,6 +806,7 @@ Create-SecurityFilter
|
||||
... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[2]
|
||||
... AND Create-Object-Search ${Toname} ${i}
|
||||
END
|
||||
|
||||
Create-ProxyFilter
|
||||
[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
|
||||
@@ -818,29 +822,60 @@ Create-ProxyFilter
|
||||
sleep ${sleep}
|
||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Host" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow0"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Search ${Hostname} ${i}
|
||||
... AND Create-Object-Proxy-Search ${Hostname} ${i}
|
||||
run keyword if "${Application}"=="HTTP" and "${i}"=="URL" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow1"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Search ${URLname} ${i}
|
||||
... AND Create-Object-Proxy-Search ${URLname} ${i}
|
||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Request Header" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow2"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Search ${Request Headername} ${i}
|
||||
... AND Create-Object-Proxy-Search ${Request Headername} ${i}
|
||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Response Header" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow3"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Search ${Response Headername} ${i}
|
||||
... AND Create-Object-Proxy-Search ${Response Headername} ${i}
|
||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Request Content" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow4"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Search ${Request Contentname} ${i}
|
||||
... AND Create-Object-Proxy-Search ${Request Contentname} ${i}
|
||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Response Content" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow5"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Search ${Response Contentname} ${i}
|
||||
... AND Create-Object-Proxy-Search ${Response Contentname} ${i}
|
||||
run keyword if "${Application}"=="Doh" and "${i}"=="Host" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow0"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Search ${DohHostname} ${i}
|
||||
... AND Create-Object-Proxy-Search ${DohHostname} ${i}
|
||||
run keyword if "${Application}"=="Doh" and "${i}"=="QNAME" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow1"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Search ${QNAMEname} ${i}
|
||||
... AND Create-Object-Proxy-Search ${QNAMEname} ${i}
|
||||
END
|
||||
|
||||
Create_Proxy_RedirectFilter
|
||||
[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类型 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 ${sleep}
|
||||
FOR ${i} IN @{Filter}
|
||||
sleep ${sleep}
|
||||
click element id=interceptionadd_add_filter
|
||||
sleep ${sleep}
|
||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Host" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow1"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Proxy-Search ${Hostname} ${i}
|
||||
run keyword if "${Application}"=="HTTP" and "${i}"=="URL" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow0"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Proxy-Search ${URLname} ${i}
|
||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Request Header" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow2"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Proxy-Search ${Request Headername} ${i}
|
||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Response Header" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow3"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Proxy-Search ${Response Headername} ${i}
|
||||
run keyword if "${Application}"=="HTTP" and "${i}"=="Request Content" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="interceptionadd_checkappshow4"][contains(text(), "${i}")]
|
||||
... AND Create-Object-Proxy-Search ${Request Contentname} ${i}
|
||||
END
|
||||
|
||||
Deny-subaction-1
|
||||
[Arguments] ${Action} ${subaction} ${Subactionadd}
|
||||
[Documentation] 调用次关键字前需要添加必填参数:
|
||||
@@ -979,19 +1014,19 @@ Deny-Redirect
|
||||
... ${CNAMEvalue}:根据${QType}填入A的CNAME的域名值或AAAA的CNAME域名值
|
||||
... ${CNAMEttl}:根据${QType}填入A的CNAME的ttl值或AAAA的CNAME的ttl值
|
||||
... 新建Redirect
|
||||
${return} ${QType} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} QType
|
||||
${return} ${QType} Run Keyword And Ignore Error Get From Dictionary ${DenyRedirectadd} QType
|
||||
${QType} Run Keyword If "${return}"=="FAIL" or "${QType}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${QType}
|
||||
${return} ${Avalue} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} Avalue
|
||||
${return} ${Avalue} Run Keyword And Ignore Error Get From Dictionary ${DenyRedirectadd} Avalue
|
||||
${Avalue} Run Keyword If "${return}"=="FAIL" or "${Avalue}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${Avalue}
|
||||
${return} ${Attl} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} Attl
|
||||
${return} ${Attl} Run Keyword And Ignore Error Get From Dictionary ${DenyRedirectadd} Attl
|
||||
${Attl} Run Keyword If "${return}"=="FAIL" or "${Attl}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${Attl}
|
||||
${return} ${CNAMEvalue} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} CNAMEvalue
|
||||
${return} ${CNAMEvalue} Run Keyword And Ignore Error Get From Dictionary ${DenyRedirectadd} CNAMEvalue
|
||||
${CNAMEvalue} Run Keyword If "${return}"=="FAIL" or "${CNAMEvalue}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${CNAMEvalue}
|
||||
${return} ${CNAMEttl} Run Keyword And Ignore Error Get From Dictionary ${${DenyRedirectadd}} CNAMEttl
|
||||
${return} ${CNAMEttl} Run Keyword And Ignore Error Get From Dictionary ${DenyRedirectadd} CNAMEttl
|
||||
${CNAMEttl} Run Keyword If "${return}"=="FAIL" or "${CNAMEttl}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${CNAMEttl}
|
||||
run keyword if "${QType}"=="A" run keywords sleep ${sleep}
|
||||
@@ -1017,6 +1052,26 @@ Deny-Redirect
|
||||
... AND input text id=ttl01 ${CNAMEttl}
|
||||
sleep ${sleep}
|
||||
click element id=interceptionadd_shezhidns
|
||||
|
||||
ProxyHTTPRedirect
|
||||
[Arguments] ${HTTPRedirectadd}
|
||||
[Documentation] 调用次关键字前需要添加必填参数:
|
||||
... ${Response Code}: 填入响应码302或者301
|
||||
... ${Redirect URL}: 填入重定向的URL地址
|
||||
${return} ${Response Code} Run Keyword And Ignore Error Get From Dictionary ${HTTPRedirectadd} Response Code
|
||||
${Response Code} Run Keyword If "${return}"=="FAIL" or "${Response Code}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${Response Code}
|
||||
${return} ${Redirect URL} Run Keyword And Ignore Error Get From Dictionary ${HTTPRedirectadd} Redirect URL
|
||||
${Redirect URL} Run Keyword If "${return}"=="FAIL" or "${Redirect URL}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${Redirect URL}
|
||||
sleep ${sleep}
|
||||
click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[1]/div[1]/div/div/div/span/span/i
|
||||
run keyword if "${Response Code}" == "302" or "${Response Code}" == "301" run keywords sleep ${sleep}
|
||||
... AND click element //span[.="${Response Code}"]
|
||||
sleep ${sleep}
|
||||
input text id=manipulontion_elInput_userRegin1 ${Redirect URL}
|
||||
sleep ${sleep}
|
||||
|
||||
Interceptadd
|
||||
[Arguments] ${Keyring} ${MirrorDecryptedTrafficInfo} ${DecryptionProfile}
|
||||
[Documentation] 引用次关键字,填入必填参数
|
||||
@@ -1355,6 +1410,23 @@ Create-Object-Search
|
||||
sleep ${sleep}
|
||||
END
|
||||
|
||||
Create-Object-Proxy-Search
|
||||
[Arguments] ${Name} ${filter}
|
||||
[Documentation] 调用次关键字前需要添加必填参数:
|
||||
... ${Name}:填入是一个列表,列表内容为object的name
|
||||
... 选择search对象
|
||||
sleep ${sleep}
|
||||
click element xpath=//*[@id="policy_paper_left"]/div[9]/div/div[1]/label[contains(text(), "${filter}")]/following-sibling::div/div
|
||||
sleep ${sleep}
|
||||
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}
|
||||
sleep ${sleep}
|
||||
press keys xpath=//*[@id="condistions_protocol"]/div[2]/p[contains(text(), "${filter}")]/following-sibling::div[2]/div/div[1]/input ENTER
|
||||
sleep ${sleep}
|
||||
click element xpath=//*[@id="condistions_protocol"]/div[2]/p[contains(text(), "${filter}")]/following-sibling::div[2]/div/div[2]/div/div/ul/li[1]
|
||||
sleep ${sleep}
|
||||
END
|
||||
|
||||
SourceIPCreateOrSearch
|
||||
[Arguments] ${PolicyType} ${CreateOrSearch} ${Add} ${Ip_type} ${Name} ${ObjectName} ${Ipclienttext1}
|
||||
... ${Port} ${Country} ${City} ${Fqdn} ${Protocols1} ${Degree} ${Times} ${Numbers} ${Limits}
|
||||
@@ -1656,8 +1728,8 @@ DestinationIPGroupAdd
|
||||
|
||||
SourceCreate-name
|
||||
[Arguments] ${ObjName}
|
||||
Wait Until Element Is Enabled id=objectAdd_name ${sleep_Wait}
|
||||
input text id=objectAdd_name ${ObjName}
|
||||
Wait Until Element Is Enabled id=objectAdd_name1 ${sleep_Wait}
|
||||
input text id=objectAdd_name1 ${ObjName}
|
||||
|
||||
SourceCreate-ok
|
||||
sleep ${sleep}
|
||||
@@ -1783,7 +1855,7 @@ Deny-subaction
|
||||
... AND sleep ${sleep}
|
||||
... AND click element //span[.="${DenyCode}"]
|
||||
... AND sleep ${sleep}
|
||||
... AND
|
||||
|
||||
Deny-content
|
||||
[Arguments] ${ContentType}=File ${SearchorCreate}=null ${ProfileName}=null ${File}=null ${TextValue}=null
|
||||
[Documentation] 调用次关键字前需要添加必填参数:
|
||||
@@ -1796,7 +1868,7 @@ Deny-content
|
||||
... ${TextValue}:填入text输入框内容
|
||||
... 添加block数据内容
|
||||
sleep ${sleep}
|
||||
run keyword if "${ContentType}"=="File" run keywords sleep ${sleep}
|
||||
run keyword if "${ContentType}"=="Profile" run keywords sleep ${sleep}
|
||||
... AND click element id=manipulation_select_blockInfo
|
||||
... AND sleep ${sleep}
|
||||
... AND click element id=ResponseContentFile
|
||||
@@ -1804,12 +1876,12 @@ Deny-content
|
||||
... AND click element id=manipulation_select_htmlProfile
|
||||
... AND sleep ${sleep}
|
||||
... AND Profile-SearchorCreate ${SearchorCreate} ${ProfileName} ${File}
|
||||
run keyword if "${ContentType}"=="Text" run keywords sleep ${sleep}
|
||||
run keyword if "${ContentType}"=="TEXT" run keywords sleep ${sleep}
|
||||
... AND click element id=manipulation_select_blockInfo
|
||||
... AND sleep ${sleep}
|
||||
... AND click ellement id=ResponseContentText
|
||||
... AND sllep 1
|
||||
... AND input text id=manipulation_elInput_blockselect ${TextValue}
|
||||
... AND click element id=ResponseContentTEXT
|
||||
... AND sleep 1
|
||||
... AND input text id=manipulation_elInput_blockselect1 ${TextValue}
|
||||
... AND sleep ${sleep}
|
||||
|
||||
|
||||
@@ -1874,37 +1946,49 @@ Replace-Action-Parameters-for2
|
||||
... ${xxxFind}:是Find输入框输入的值
|
||||
... ${XXXReplacewith} :是 Replacewith输入框中输入的值
|
||||
FOR ${j} IN @{ParametersType}
|
||||
run keyword if "${j}"=="RequestURI" run keywords sleep ${sleep}
|
||||
run keyword if "${j}"=="HTTP Request-URI" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
||||
... AND sleep ${sleep}
|
||||
... AND click element //li[.="${j}"]
|
||||
... AND sleep ${sleep}
|
||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${RequestURIFind}
|
||||
... AND sleep ${sleep}
|
||||
... AND click element //li[.="${j}"]
|
||||
... AND sleep ${sleep}
|
||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${RequestURIReplacewith}
|
||||
... AND sleep ${sleep}
|
||||
run keyword if "${j}"=="RequestBody" run keywords sleep ${sleep}
|
||||
run keyword if "${j}"=="HTTP Request Body" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
||||
... AND sleep ${sleep}
|
||||
... AND click element //li[.="${j}"]
|
||||
... AND sleep ${sleep}
|
||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${RequestBodyFind}
|
||||
... AND sleep ${sleep}
|
||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${RequestBodyReplacewith}
|
||||
... AND sleep ${sleep}
|
||||
run keyword if "${j}"=="ResponseBody" run keywords sleep ${sleep}
|
||||
run keyword if "${j}"=="HTTP Response Body" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
||||
... AND sleep ${sleep}
|
||||
... AND click element //li[.="${j}"]
|
||||
... AND sleep ${sleep}
|
||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${ResponseBodyFind}
|
||||
... AND sleep ${sleep}
|
||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${ResponseBodyReplacewith}
|
||||
... AND sleep ${sleep}
|
||||
run keyword if "${j}"=="RequestHeader" run keywords sleep ${sleep}
|
||||
run keyword if "${j}"=="HTTP Request Header" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
||||
... AND sleep ${sleep}
|
||||
... AND click element //li[.="${j}"]
|
||||
... AND sleep ${sleep}
|
||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${RequestHeaderFind}
|
||||
... AND sleep ${sleep}
|
||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${RequestHeaderReplacewith}
|
||||
... AND sleep ${sleep}
|
||||
run keyword if "${j}"=="ResponseHeader" run keywords sleep ${sleep}
|
||||
run keyword if "${j}"=="HTTP Response Header" run keywords sleep ${sleep}
|
||||
... AND click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[1]/div/div/div[1]/input
|
||||
... AND sleep ${sleep}
|
||||
... AND click element //li[.="${j}"]
|
||||
... AND sleep ${sleep}
|
||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[2]/div/div/input ${ResponseHeaderFind}
|
||||
... AND sleep ${sleep}
|
||||
... AND input text xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[3]/ul/li[${i}]/div[3]/div/div/input ${ResponseHeaderReplacewith}
|
||||
@@ -1944,11 +2028,11 @@ HijackFile-SearchorCreate
|
||||
click element xpath=//*[@id="policy_paper_left"]/div[12]/div/div/form/div[4]/div/div/div/div
|
||||
sleep ${sleep}
|
||||
run keyword if "${SearchorCreate}"=="Search" run keywords sleep ${sleep}
|
||||
... AND input text xapth=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ${Hijackname}
|
||||
... AND input text xpath=/html/body/div[last()]/div[1]/div[1]/ul/div[1]/div/input ${Hijackname}
|
||||
... AND sleep ${sleep}
|
||||
... AND press keys xapth=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ENTER
|
||||
... AND press keys xpath=/html/body/div[last()]/div[1]/div[1]/ul/div[1]/div/input ENTER
|
||||
... AND sleep ${sleep}
|
||||
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[2]/div/li[1]
|
||||
... AND click element xpath=/html/body/div[last()]/div[1]/div[1]/ul/div[2]/li[1]
|
||||
... AND sleep ${sleep}
|
||||
... ELSE IF "${SearchorCreate}"=="Create" run keywords sleep ${sleep}
|
||||
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[1]/div/div/button
|
||||
@@ -2008,11 +2092,11 @@ InsertScript-SearchorCreate
|
||||
click element id=manipulation_select_insetScript
|
||||
sleep ${sleep}
|
||||
run keyword if "${SearchorCreate}"=="Search" run keywords sleep ${sleep}
|
||||
... AND input text xapth=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ${Insertname}
|
||||
... AND input text xpath=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ${Insertname}
|
||||
... AND sleep ${sleep}
|
||||
... AND press keys xapth=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ENTER
|
||||
... AND press keys xpath=/html/body/div/div[1]/div[1]/ul/div[1]/div/input ENTER
|
||||
... AND sleep ${sleep}
|
||||
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[2]/div/li[1]
|
||||
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[2]/li[2]
|
||||
... AND sleep ${sleep}
|
||||
... ELSE IF "${SearchorCreate}"=="Create" run keywords sleep ${sleep}
|
||||
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/div[1]/div/div/button
|
||||
|
||||
Reference in New Issue
Block a user