From 1df4fdbc6c4d2164114a2a63d5543e9403149614 Mon Sep 17 00:00:00 2001 From: byb11 Date: Tue, 2 Mar 2021 15:28:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B0=81=E8=A3=85=E5=85=B3?= =?UTF-8?q?=E9=94=AE=E5=AD=97=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=AD=96=E7=95=A5=E5=85=B3=E9=94=AE=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 02-Keyword/tsg_ui/policy/UIPolicy.robot | 28 +++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/02-Keyword/tsg_ui/policy/UIPolicy.robot b/02-Keyword/tsg_ui/policy/UIPolicy.robot index ff93312..61cf8f4 100644 --- a/02-Keyword/tsg_ui/policy/UIPolicy.robot +++ b/02-Keyword/tsg_ui/policy/UIPolicy.robot @@ -80,11 +80,11 @@ UIAddPolicies UIPolicy.Create-Application-Button ${PolicyType} ${ApplicationSearchV} ${PolicyAction} #编辑filter - Run Keyword If "${FilterInfo}"=="${EMPTY}" log there is no FilterInfo + Run Keyword If "${FilterInfo}"=="null" log there is no FilterInfo ... ELSE Create-Filter-SecurityOrProxy ${PolicyType} ${ApplicationSearchV}[0] ${FilterInfo} 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} ... AND Proxy-Deny ${ProxyDenyadd} @@ -339,8 +339,8 @@ CreateSource ${ObjectName} Run Keyword If "${return}"=="FAIL" or "${ObjectName}"=="${EMPTY}" set variable null ... ELSE set variable ${ObjectName} ${return} ${Name} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Name - ${Type1} Run Keyword If "${return}"=="FAIL" or "${Type1}"=="${EMPTY}" set variable null - ... ELSE set variable ${Type1} + ${Name} Run Keyword If "${return}"=="FAIL" or "${Name}"=="${EMPTY}" set variable null + ... ELSE set variable ${Name} ${return} ${Ipclienttext1} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Ipclienttext1 ${Ipclienttext1} Run Keyword If "${return}"=="FAIL" or "${Ipclienttext1}"=="${EMPTY}" set variable null ... ELSE set variable ${Ipclienttext1} @@ -373,7 +373,7 @@ CreateSource ... ELSE set variable ${Limits} ${return} ${Keywordtext} Run Keyword And Ignore Error Get From Dictionary ${AddDict} Keywordtext ${Keywordtext} Run Keyword If "${return}"=="FAIL" or "${Keywordtext}"=="${EMPTY}" set variable null - ... ELSE set variable ${Keywordtext} + ... ELSE set variable ${Keywordtext} run keyword if "${Type1}"=="Ip" run keywords sleep ${sleep} ... AND click element xpath=${typepath}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[1] ... AND sleep ${sleep} @@ -576,6 +576,9 @@ 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} + click element id=check_list_allcancelobject + sleep ${sleep} + ProxyApplicationSearch [Arguments] ${Action} ${HttpOrDoh} [Documentation] 调用次关键字前需要添加必填参数: @@ -603,7 +606,7 @@ Create-Filter-SecurityOrProxy [Arguments] ${PolicyType} ${Application} ${addFilter} [Documentation] 点击Application的加号 ${return} ${Filter} Run Keyword And Ignore Error Get From Dictionary ${addFilter} Filter - ${Filter} Run Keyword If "${return}"=="FAIL" or "${Filter}"=="${EMPTY}" Set To List null + ${Filter} Run Keyword If "${return}"=="FAIL" or "${Filter}"=="${EMPTY}" set variable null ... ELSE set variable ${Filter} ${return} ${Hostname} Run Keyword And Ignore Error Get From Dictionary ${addFilter} Hostname ${Hostname} Run Keyword If "${return}"=="FAIL" or "${Hostname}"=="${EMPTY}" set variable null @@ -771,6 +774,12 @@ Create-SecurityFilter run keyword if "${Application}"=="QUIC" and "${i}"=="SNI" run keywords sleep ${sleep} ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[1] ... AND Create-Object-Search ${QUICSNIname} ${i} + run keyword if "${Application}"=="SIP" and "${i}"=="From" run keywords sleep ${sleep} + ... AND click element xpath=//*[@id="condistions_protocol"]/div/div[1]/div/div/div/ul/li[1] + ... AND Create-Object-Search ${Fromname} ${i} + run keyword if "${Application}"=="SIP" and "${i}"=="To" run keywords sleep ${sleep} + ... 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 @@ -2112,3 +2121,10 @@ Proxy-Policies-OK sleep ${sleep} click element id=proxyManipulationSuccess sleep ${sleep} + +PoliciesDelete + sleep ${sleep} + click element id=appDel + sleep ${sleep} + click element xpath=/html/body/div/div/div[3]/button[2] + sleep ${sleep}