1、删除重复关键字2、提交安全代理策略修改关键字3、提交tcp策略新增关键字(未验证)
This commit is contained in:
@@ -108,7 +108,7 @@ UIAddPolicies
|
||||
... ELSE ProxyAssert ${PolicyName}
|
||||
|
||||
UIUpdataPolicies
|
||||
[Arguments] ${PolicyInfo} ${SourceInfo}=null ${DestinationInfo}=null ${FilterInfo}=null ${Subactionadd}=null ${Keyring}=null ${MirrorDecryptedTrafficInfo}=null ${DecryptionProfile}=null
|
||||
[Arguments] ${PolicyInfo} ${SourceInfo}=null ${DestinationInfo}=null ${EditFilterInfo}=null ${CreateOrDeleteFilterInfo}=null ${Subactionadd}=null ${Keyring}=null ${MirrorDecryptedTrafficInfo}=null ${DecryptionProfile}=null
|
||||
... ${ProxyDenyadd}=null ${DenyRedirectadd}=null ${ReplaceActionParameters}=null ${HijackFileadd}=null ${InsertScript}=null
|
||||
[Documentation] 编辑策略
|
||||
|
||||
@@ -144,7 +144,7 @@ UIUpdataPolicies
|
||||
|
||||
${return} ${PolicyLogSession} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} PolicyLogSession
|
||||
${PolicyLogSession} Run Keyword If "${return}"=="FAIL" or "${PolicyLogSession}"=="${EMPTY}" set variable ${Default_PolicyLogSession}
|
||||
... ELSE set variable ${PolicyLogSessionession}
|
||||
... ELSE set variable ${PolicyLogSession}
|
||||
|
||||
${return} ${LogOptions} Run Keyword And Ignore Error Get From Dictionary ${PolicyInfo} LogOptions
|
||||
${LogOptions} Run Keyword If "${return}"=="FAIL" or "${LogOptions}"=="${EMPTY}" set variable 1
|
||||
@@ -156,9 +156,6 @@ UIUpdataPolicies
|
||||
|
||||
Comment 新建策略 打开菜单
|
||||
Menu policys ${PolicyType}
|
||||
|
||||
Comment 新建策略 打开安全策略列表上方的新建策略按钮
|
||||
UIPolicy.CreateButton
|
||||
Comment 搜索要编辑的策略
|
||||
Security-Source Name ${PolicyName}
|
||||
Comment 点击编辑按钮Edit
|
||||
@@ -168,34 +165,36 @@ UIUpdataPolicies
|
||||
Comment 编辑action
|
||||
UIPolicy.Create-actions ${PolicyType} ${PolicyAction}
|
||||
Comment 编辑Source
|
||||
Run Keyword If "${SourceInfo}"=="${EMPTY}" log there is no SourceInfoDict
|
||||
Run Keyword If "${SourceInfo}"=="${EMPTY}" or "${SourceInfo}"=="null" log there is no SourceInfoDict
|
||||
... ELSE UIPolicy. Create-Source-Button
|
||||
Run Keyword If "${SourceInfo}"=="${EMPTY}" log there is no SourceInfoDict
|
||||
Run Keyword If "${SourceInfo}"=="${EMPTY}" or "${SourceInfo}"=="null" log there is no SourceInfoDict
|
||||
... ELSE UIPolicy.CreateEditDeleteSources ${SourceInfo}
|
||||
Comment 编辑Destination
|
||||
Run Keyword If "${DestinationInfo}"=="${EMPTY}" log there is no DestinationInfo
|
||||
Run Keyword If "${DestinationInfo}"=="${EMPTY}" or "${DestinationInfo}"=="null" log there is no DestinationInfo
|
||||
... ELSE UIPolicy.Create-Destination-Button
|
||||
Run Keyword If "${DestinationInfo}"=="${EMPTY}" log there is no DestinationInfo
|
||||
Run Keyword If "${DestinationInfo}"=="${EMPTY}" or "${DestinationInfo}"=="null" log there is no DestinationInfo
|
||||
... ELSE UIPolicy.CreateEditDeleteDestination ${DestinationInfo}
|
||||
Comment 编辑Application
|
||||
UIPolicy.Create-Application-Button ${PolicyType} ${ApplicationSearchV} ${PolicyAction}
|
||||
#编辑filter
|
||||
Run Keyword If "${FilterInfo}"=="${EMPTY}" log there is no FilterInfo
|
||||
... ELSE Create-Filter-SecurityOrProxy ${PolicyType} ${ApplicationFilter} ${FilterInfo}
|
||||
Run Keyword If "${EditFilterInfo}"=="${EMPTY}" or "${EditFilterInfo}"=="null" log there is no FilterInfo
|
||||
... ELSE Create-Filter-SecurityOrProxy ${PolicyType} ${ApplicationFilter} ${EditFilterInfo}
|
||||
Run Keyword If "${CreateOrDeleteFilterInfo}"=="${EMPTY}" or "${CreateOrDeleteFilterInfo}"=="null" log there is no FilterInfo
|
||||
... ELSE Edit-Filter-SecurityOrProxy ${PolicyType} ${CreateOrDeleteFilterInfo}
|
||||
|
||||
Run Keyword If "${PolicyType}"=="Security Policy" and "${PolicyAction}"=="deny" run keywords sleep ${sleep}
|
||||
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}
|
||||
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}
|
||||
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" run keywords sleep ${sleep}
|
||||
... AND Deny-Redirect ${DenyRedirectadd}
|
||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="replace" run keywords sleep ${sleep}
|
||||
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}
|
||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Hijack" run keywords sleep ${sleep}
|
||||
... AND HijackFile-SearchorCreate ${HijackFileadd}
|
||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="insert" run keywords sleep ${sleep}
|
||||
Run Keyword If "${PolicyType}"=="Proxy Policy" and "${PolicyAction}"=="Insert" run keywords sleep ${sleep}
|
||||
... AND InsertScript-SearchorCreate ${InsertScript}
|
||||
Run Keyword If "${PolicyType}"=="Proxy Policy" run keywords ProxyLogSession ${PolicyLogSession}
|
||||
... AND ProxyLogOptions ${LogOptions}
|
||||
@@ -204,9 +203,9 @@ UIUpdataPolicies
|
||||
... ELSE ProxyEnabled ${PolicyEnabled}
|
||||
Run Keyword If "${PolicyType}"=="Security Policy" Security-Policies-OK
|
||||
... ELSE Proxy-Policies-OK
|
||||
Security-Source Name ${PolicyName}
|
||||
Run Keyword If "${PolicyType}"=="Security Policy" SecurityAssert ${PolicyName}
|
||||
... ELSE ProxyAssert ${PolicyName}
|
||||
Security-Source Name ${PolicyEditName}
|
||||
Run Keyword If "${PolicyType}"=="Security Policy" SecurityAssert ${PolicyEditName}
|
||||
... ELSE ProxyAssert ${PolicyEditName}
|
||||
|
||||
SecurityAssert
|
||||
[Arguments] ${PolicyName}
|
||||
@@ -549,6 +548,7 @@ Create-Destination-Button
|
||||
Wait Until Element Is Enabled xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[1]/div/div 10
|
||||
sleep ${sleep}
|
||||
click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]/div[1]/div/div
|
||||
|
||||
Create-Application-Button
|
||||
[Arguments] ${PolicyType} ${ApplicationSearchV} ${Action}
|
||||
[Documentation] 点击Application的加号
|
||||
@@ -559,6 +559,7 @@ Create-Application-Button
|
||||
... AND sleep ${sleep}
|
||||
run keyword if "${PolicyType}"=="Proxy Policy" ProxyApplicationSearch ${Action} ${ApplicationSearchV}
|
||||
|
||||
|
||||
SecurityApplicationFor
|
||||
[Arguments] ${ApplicationSearchV}
|
||||
${a} set variable ${ApplicationSearchV}[0]
|
||||
@@ -580,6 +581,12 @@ SecurityApplicationSearch
|
||||
sleep ${sleep}
|
||||
click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[5]/div[2]/div[2]/div/div[3]/div/div/ul/li[1]
|
||||
sleep ${sleep}
|
||||
${style}= Get Element Attribute class=el-message-box__wrapper style
|
||||
log ${style}1111111111111
|
||||
${c} Evaluate "display: none" in """${style}"""
|
||||
run keyword if "${c}"=="False" click element xpath=/html/body/div/div/div[3]/button[2]
|
||||
run keyword if "${c}"=="True" log go on
|
||||
sleep ${sleep}
|
||||
click element id=check_list_allcancelobject
|
||||
sleep ${sleep}
|
||||
|
||||
@@ -1793,82 +1800,8 @@ Deny-content
|
||||
... AND sllep 1
|
||||
... AND input text id=manipulation_elInput_blockselect ${TextValue}
|
||||
... AND sleep ${sleep}
|
||||
Profile-SearchorCreate_bak
|
||||
[Arguments] ${SearchorCreate} ${ProfileName} ${File}
|
||||
[Documentation] 调用次关键字前需要添加必填参数:
|
||||
... ${SearchorCreate}:填入Search或Create
|
||||
... ${ProfileName}:Profile的名字
|
||||
... ${File}:上传文件路径
|
||||
... 判断是新建还是搜索profile
|
||||
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 ${ProfileName}
|
||||
... AND sleep ${sleep}
|
||||
... AND press keys xapth=/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 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
|
||||
... AND sleep ${sleep}
|
||||
... AND input text id=responsepages_profileName ${ProfileName}
|
||||
... AND sleep ${sleep}
|
||||
... AND Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[2]/div/div/div/input ${File} #上传文件
|
||||
... AND sleep ${sleep}
|
||||
... AND click element id=responseAddOk1
|
||||
... AND sleep ${sleep}
|
||||
... ELSE log 传入参数错误
|
||||
Deny-Redirect_bak
|
||||
[Arguments] ${DenyRedirectadd}
|
||||
[Documentation] 调用次关键字前需要添加必填参数:${DenyRedirectadd}是个字典,字典中的数据为下
|
||||
... ${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值
|
||||
... 新建Redirect
|
||||
${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
|
||||
${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
|
||||
${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
|
||||
${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
|
||||
${CNAMEttl} Run Keyword If "${return}"=="FAIL" or "${CNAMEttl}"=="${EMPTY}" set variable null
|
||||
... ELSE set variable ${CNAMEttl}
|
||||
|
||||
sleep ${sleep}
|
||||
click element id=interceptionadd_add_filter
|
||||
sleep ${sleep}
|
||||
run keyword if "${QType}"=="A" run keywords sleep ${sleep}
|
||||
... AND input text id=A00 ${Avalue}
|
||||
... AND sleep ${sleep}
|
||||
... AND input text id=ttl00 ${Attl}
|
||||
... AND sleep ${sleep}
|
||||
... AND click element id=interceptionadd_addForm
|
||||
... AND sleep ${sleep}
|
||||
... AND input text id=Cname01 ${CNAMEvalue}
|
||||
... AND sleep ${sleep}
|
||||
... AND input text id=ttl01 ${CNAMEttl}
|
||||
run keyword if "${QType}"=="AAAA" run keywords sleep ${sleep}
|
||||
... AND click element id=dns_qtype_radio01
|
||||
... AND input text id=AAAA00 ${Avalue}
|
||||
... AND sleep ${sleep}
|
||||
... AND input text id=ttl00 ${Attl}
|
||||
... AND sleep ${sleep}
|
||||
... AND click element id=interceptionadd_addForm
|
||||
... AND sleep ${sleep}
|
||||
... AND input text id=Cname01 ${CNAMEvalue}
|
||||
... AND sleep ${sleep}
|
||||
... AND input text id=ttl01 ${CNAMEttl}
|
||||
sleep ${sleep}
|
||||
click element id=interceptionadd_shezhidns
|
||||
|
||||
|
||||
|
||||
Replace-Action-Parameters-for1
|
||||
[Arguments] ${ReplaceActionParameters}
|
||||
@@ -2115,7 +2048,7 @@ ProxyLogOptions
|
||||
[Documentation] 调用次关键字前需要添加必填参数:
|
||||
... ${LogOptions}:填入All或其他
|
||||
run keyword if "${LogOptions}"=="All" run keywords sleep ${sleep}
|
||||
... AND click element id=logtype1
|
||||
... AND click element id=logType1
|
||||
... ELSE log 选择Metadata only
|
||||
ProxyEnabled
|
||||
[Arguments] ${Enabled}
|
||||
@@ -2131,7 +2064,24 @@ Proxy-Policies-OK
|
||||
sleep ${sleep}
|
||||
click element id=proxyManipulationSuccess
|
||||
sleep ${sleep}
|
||||
|
||||
Edit-Filter-SecurityOrProxy
|
||||
[Arguments] ${PolicyType} ${EditFilterdict}
|
||||
${typepath} Run Keyword If "${PolicyType}"=="Security Policy" set variable /html/body/div[1]/div/div[3]/div[2]/div/div[1]/form[1]/div/div[8]/div[1]/div[1]/label
|
||||
... ELSE set variable /html/body/div[1]/div/div[3]/div[2]/div/div[1]/form[1]/div/div[9]/div[1]/div[1]/label
|
||||
FOR ${Var} ${Filter} IN ENUMERATE @{dict}
|
||||
click element xpath=${typepath}[contains(text(), "${Filter}")]/following-sibling::div/div/i
|
||||
sleep ${sleep}
|
||||
input text xpath=//*[@id="condistions_protocol"]/div[2]/p[contains(text(), "${filter}")]/following-sibling::div[2]/div/div[1]/input ${EditFilterdict}[${Filter}]
|
||||
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}
|
||||
${class}= Get Element Attribute xpath=xpath=${typepath}[contains(text(), "${key}")]/following-sibling::div/div class
|
||||
run keyword if "${class}"=="addobject addobject-long-list float-left" log 不操作
|
||||
run keyword if "${class}"=="addobject addobject-long-list float-left obj-content-null" run keywords sleep ${sleep}
|
||||
... AND click element xpath=${typepath}[contains(text(), "${key}")]/following-sibling::div/div[2]/i
|
||||
END
|
||||
PoliciesDelete
|
||||
sleep ${sleep}
|
||||
click element id=appDel
|
||||
|
||||
Reference in New Issue
Block a user