提交安全策略修改关键字
This commit is contained in:
@@ -11,7 +11,7 @@ edit-keywords-001
|
|||||||
CreatePage Key single *pppp keywordtext=*pppp
|
CreatePage Key single *pppp keywordtext=*pppp
|
||||||
#验证新建是否成功
|
#验证新建是否成功
|
||||||
ui-object-search-name *pppp
|
ui-object-search-name *pppp
|
||||||
${text} get text //*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/div/div/span
|
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/div/div/span
|
||||||
Should Be Equal As Strings ${text} *pppp
|
Should Be Equal As Strings ${text} *pppp
|
||||||
object-edit-keywords *pppp 656e676c6973 hex=open
|
object-edit-keywords *pppp 656e676c6973 hex=open
|
||||||
ui-object-search-name *pppp
|
ui-object-search-name *pppp
|
||||||
@@ -23,7 +23,7 @@ create-keywords-002
|
|||||||
CreatePage Key single 656e676c6973 keywordtext=656e676c6973 hex=open
|
CreatePage Key single 656e676c6973 keywordtext=656e676c6973 hex=open
|
||||||
#验证新建是否成功
|
#验证新建是否成功
|
||||||
ui-object-search-name 656e676c6973
|
ui-object-search-name 656e676c6973
|
||||||
${text} get text //*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/div/div/span
|
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/div/div/span
|
||||||
Should Be Equal As Strings ${text} 656e676c6973
|
Should Be Equal As Strings ${text} 656e676c6973
|
||||||
#删除对象
|
#删除对象
|
||||||
objects-delete
|
objects-delete
|
||||||
@@ -33,7 +33,7 @@ create-keywords-003
|
|||||||
CreatePage Key single *скрипцияк keywordtext=*скрипцияк
|
CreatePage Key single *скрипцияк keywordtext=*скрипцияк
|
||||||
#验证新建是否成功
|
#验证新建是否成功
|
||||||
ui-object-search-name *скрипцияк
|
ui-object-search-name *скрипцияк
|
||||||
${text} get text //*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/div/div/span
|
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/div/div/span
|
||||||
Should Be Equal As Strings ${text} *скрипцияк
|
Should Be Equal As Strings ${text} *скрипцияк
|
||||||
#删除对象
|
#删除对象
|
||||||
objects-delete
|
objects-delete
|
||||||
|
|||||||
@@ -56,6 +56,31 @@ SecurityPolicy-Deny-HTTP-MaxCombination-Drop
|
|||||||
LogSession 1
|
LogSession 1
|
||||||
Enabled open
|
Enabled open
|
||||||
Security-Policies-OK
|
Security-Policies-OK
|
||||||
|
sleep 1
|
||||||
|
#修改策略,修改策略相当于再进行一遍新增
|
||||||
|
Comment 修改策略
|
||||||
|
Security-Source Name SecurityPolicy-Deny-HTTP-MaxCombination
|
||||||
|
EditButton
|
||||||
|
Initialize-Policie Deny
|
||||||
|
#新建策略
|
||||||
|
SecurityPolicy.Create-name SecurityPolicy-Deny-SSL-MaxCombination-Drop
|
||||||
|
SecurityPolicy.Create-action deny
|
||||||
|
SecurityPolicy.Create-Source-Button
|
||||||
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.2 post=1
|
||||||
|
SecurityPolicy.Create-Destination-Button
|
||||||
|
SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.3 post=1
|
||||||
|
${fqdnname} create list zdhfqdn
|
||||||
|
${filter} create list SNI CN SAN
|
||||||
|
Create-Application-Button
|
||||||
|
ApplicationSearch SSL
|
||||||
|
Create-Filter-judge Application=SSL Filter=${filter} SSLSNIname=${fqdnname} CNname=${fqdnname} SANname=${fqdnname}
|
||||||
|
Deny-subaction action=deny subaction=RST
|
||||||
|
LogSession 1
|
||||||
|
Enabled open
|
||||||
|
Security-Policies-OK
|
||||||
|
Security-Source Name SecurityPolicy-Deny-SSL-MaxCombination-Drop
|
||||||
|
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/p
|
||||||
|
Should Be Equal As Strings ${text} SecurityPolicy-Deny-SSL-MaxCombination-Drop
|
||||||
|
|
||||||
SecurityPolicy-Deny-HTTP-MaxCombination-RST
|
SecurityPolicy-Deny-HTTP-MaxCombination-RST
|
||||||
#新建对象fqdn
|
#新建对象fqdn
|
||||||
@@ -351,6 +376,189 @@ SecurityPolicy-Deny-HTTP-Host-Alert204
|
|||||||
Security-Policies-OK
|
Security-Policies-OK
|
||||||
|
|
||||||
|
|
||||||
|
SecurityPolicy-Deny-SSL-MaxCombination-Drop
|
||||||
|
#新建对象fqdn
|
||||||
|
Comment 新建对象fqdn
|
||||||
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
||||||
|
#新建策略
|
||||||
|
Comment 新建策略
|
||||||
|
Menu policys Security Policy
|
||||||
|
SecurityPolicy.CreateButton
|
||||||
|
SecurityPolicy.Create-name SecurityPolicy-Deny-SSL-MaxCombination-Drop
|
||||||
|
SecurityPolicy.Create-action deny
|
||||||
|
SecurityPolicy.Create-Source-Button
|
||||||
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
#SecurityPolicy.Create-Destination-Button
|
||||||
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
${fqdnname} create list zdhfqdn
|
||||||
|
${filter} create list SNI CN SAN
|
||||||
|
Create-Application-Button
|
||||||
|
ApplicationSearch SSL
|
||||||
|
Create-Filter-judge Application=SSL Filter=${filter} SSLSNIname=${fqdnname} CNname=${fqdnname} SANname=${fqdnname}
|
||||||
|
Deny-subaction action=deny subaction=Drop
|
||||||
|
LogSession 1
|
||||||
|
Enabled open
|
||||||
|
Security-Policies-OK
|
||||||
|
|
||||||
|
SecurityPolicy-Deny-SSL-MaxCombination-RST
|
||||||
|
#新建对象fqdn
|
||||||
|
Comment 新建对象fqdn
|
||||||
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
||||||
|
#新建策略
|
||||||
|
Comment 新建策略
|
||||||
|
Menu policys Security Policy
|
||||||
|
SecurityPolicy.CreateButton
|
||||||
|
SecurityPolicy.Create-name SecurityPolicy-Deny-SSL-MaxCombination-Drop
|
||||||
|
SecurityPolicy.Create-action deny
|
||||||
|
SecurityPolicy.Create-Source-Button
|
||||||
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
#SecurityPolicy.Create-Destination-Button
|
||||||
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
${fqdnname} create list zdhfqdn
|
||||||
|
${filter} create list SNI CN SAN
|
||||||
|
Create-Application-Button
|
||||||
|
ApplicationSearch SSL
|
||||||
|
Create-Filter-judge Application=SSL Filter=${filter} SSLSNIname=${fqdnname} CNname=${fqdnname} SANname=${fqdnname}
|
||||||
|
Deny-subaction action=deny subaction=RST
|
||||||
|
LogSession 1
|
||||||
|
Enabled open
|
||||||
|
Security-Policies-OK
|
||||||
|
|
||||||
|
SecurityPolicy-Deny-DNS-MaxCombination-Drop
|
||||||
|
#新建对象fqdn
|
||||||
|
Comment 新建对象fqdn
|
||||||
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
||||||
|
#新建策略
|
||||||
|
Comment 新建策略
|
||||||
|
Menu policys Security Policy
|
||||||
|
SecurityPolicy.CreateButton
|
||||||
|
SecurityPolicy.Create-name SecurityPolicy-Deny-SSL-MaxCombination-Drop
|
||||||
|
SecurityPolicy.Create-action deny
|
||||||
|
SecurityPolicy.Create-Source-Button
|
||||||
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
#SecurityPolicy.Create-Destination-Button
|
||||||
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
${fqdnname} create list zdhfqdn
|
||||||
|
${filter} create list QNAME
|
||||||
|
Create-Application-Button
|
||||||
|
ApplicationSearch DNS
|
||||||
|
Create-Filter-judge Application=DNS Filter=${filter} QNAMEname=${fqdnname}
|
||||||
|
Deny-subaction action=deny subaction=Drop
|
||||||
|
LogSession 1
|
||||||
|
Enabled open
|
||||||
|
Security-Policies-OK
|
||||||
|
|
||||||
|
SecurityPolicy-Deny-DNS-MaxCombination-Redirect-A
|
||||||
|
#新建对象fqdn
|
||||||
|
Comment 新建对象fqdn
|
||||||
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
||||||
|
#新建策略
|
||||||
|
Comment 新建策略
|
||||||
|
Menu policys Security Policy
|
||||||
|
SecurityPolicy.CreateButton
|
||||||
|
SecurityPolicy.Create-name SecurityPolicy-Deny-SSL-MaxCombination-Drop
|
||||||
|
SecurityPolicy.Create-action deny
|
||||||
|
SecurityPolicy.Create-Source-Button
|
||||||
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
#SecurityPolicy.Create-Destination-Button
|
||||||
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
${fqdnname} create list zdhfqdn
|
||||||
|
${filter} create list QNAME
|
||||||
|
Create-Application-Button
|
||||||
|
ApplicationSearch DNS
|
||||||
|
Create-Filter-judge Application=DNS Filter=${filter} QNAMEname=${fqdnname}
|
||||||
|
Deny-subaction action=deny subaction=Redirect QType=A Avalue=5.5.5.5 Attl=100 CNAMEvalue=www.a.b CNAMEttl=1000
|
||||||
|
LogSession 1
|
||||||
|
Enabled open
|
||||||
|
Security-Policies-OK
|
||||||
|
|
||||||
|
SecurityPolicy-Deny-DNS-MaxCombination-Redirect-AAAA
|
||||||
|
#新建对象fqdn
|
||||||
|
Comment 新建对象fqdn
|
||||||
|
CreatePage FQDN single zdhfqdn keywordtext=*www.baidu.com
|
||||||
|
#新建策略
|
||||||
|
Comment 新建策略
|
||||||
|
Menu policys Security Policy
|
||||||
|
SecurityPolicy.CreateButton
|
||||||
|
SecurityPolicy.Create-name SecurityPolicy-Deny-SSL-MaxCombination-Drop
|
||||||
|
SecurityPolicy.Create-action deny
|
||||||
|
SecurityPolicy.Create-Source-Button
|
||||||
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
#SecurityPolicy.Create-Destination-Button
|
||||||
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
${fqdnname} create list zdhfqdn
|
||||||
|
${filter} create list QNAME
|
||||||
|
Create-Application-Button
|
||||||
|
ApplicationSearch DNS
|
||||||
|
Create-Filter-judge Application=DNS Filter=${filter} QNAMEname=${fqdnname}
|
||||||
|
Deny-subaction action=deny subaction=Redirect QType=AAAA Avalue=1234::ABCD Attl=100 CNAMEvalue=www.a.b CNAMEttl=1000
|
||||||
|
LogSession 1
|
||||||
|
Enabled open
|
||||||
|
Security-Policies-OK
|
||||||
|
|
||||||
|
SecurityPolicy-Deny-FTP-MaxCombination-Drop
|
||||||
|
#新建对象url
|
||||||
|
Comment 新建对象url
|
||||||
|
CreatePage URL single zdhftpurl keywordtext=*.com
|
||||||
|
#新建Content
|
||||||
|
Comment Content
|
||||||
|
CreatePage Key single zdhftpContent keywordtext=*pppp
|
||||||
|
#新建Account
|
||||||
|
Comment Account
|
||||||
|
CreatePage Key single zdhftpAccount keywordtext=*pppp
|
||||||
|
#新建策略
|
||||||
|
Comment 新建策略
|
||||||
|
Menu policys Security Policy
|
||||||
|
SecurityPolicy.CreateButton
|
||||||
|
SecurityPolicy.Create-name SecurityPolicy-Deny-SSL-MaxCombination-Drop
|
||||||
|
SecurityPolicy.Create-action deny
|
||||||
|
SecurityPolicy.Create-Source-Button
|
||||||
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
#SecurityPolicy.Create-Destination-Button
|
||||||
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
${URIname} create list zdhftpurl
|
||||||
|
${FTPContentname} create list zdhftpContent
|
||||||
|
${FTPAccountname} create list zdhftpAccount
|
||||||
|
${filter} create list URI Content Account
|
||||||
|
Create-Application-Button
|
||||||
|
ApplicationSearch FTP
|
||||||
|
Create-Filter-judge Application=FTP Filter=${filter} URIname=${URIname} FTPContentname=${FTPContentname} FTPAccountname=${FTPAccountname}
|
||||||
|
Deny-subaction action=deny subaction=Drop
|
||||||
|
LogSession 1
|
||||||
|
Enabled open
|
||||||
|
Security-Policies-OK
|
||||||
|
|
||||||
|
SecurityPolicy-Deny-FTP-MaxCombination-RST
|
||||||
|
#新建对象url
|
||||||
|
Comment 新建对象url
|
||||||
|
CreatePage URL single zdhftpurl keywordtext=*.com
|
||||||
|
#新建Content
|
||||||
|
Comment Content
|
||||||
|
CreatePage Key single zdhftpContent keywordtext=*pppp
|
||||||
|
#新建Account
|
||||||
|
Comment Account
|
||||||
|
CreatePage Key single zdhftpAccount keywordtext=*pppp
|
||||||
|
#新建策略
|
||||||
|
Comment 新建策略
|
||||||
|
Menu policys Security Policy
|
||||||
|
SecurityPolicy.CreateButton
|
||||||
|
SecurityPolicy.Create-name SecurityPolicy-Deny-SSL-MaxCombination-Drop
|
||||||
|
SecurityPolicy.Create-action deny
|
||||||
|
SecurityPolicy.Create-Source-Button
|
||||||
|
SecurityPolicy.Create-Source type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
#SecurityPolicy.Create-Destination-Button
|
||||||
|
#SecurityPolicy.Create-Destination type1=Ip CreateOrSearch=Create Add=Address name=zdhip001 ipclienttext1=192.168.100.1 post=1
|
||||||
|
${URIname} create list zdhftpurl
|
||||||
|
${FTPContentname} create list zdhftpContent
|
||||||
|
${FTPAccountname} create list zdhftpAccount
|
||||||
|
${filter} create list URI Content Account
|
||||||
|
Create-Application-Button
|
||||||
|
ApplicationSearch FTP
|
||||||
|
Create-Filter-judge Application=FTP Filter=${filter} URIname=${URIname} FTPContentname=${FTPContentname} FTPAccountname=${FTPAccountname}
|
||||||
|
Deny-subaction action=deny subaction=RST
|
||||||
|
LogSession 1
|
||||||
|
Enabled open
|
||||||
|
Security-Policies-OK
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -912,240 +912,54 @@ DestinationCreate-ok
|
|||||||
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]
|
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]
|
||||||
|
|
||||||
|
|
||||||
|
Security-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
|
||||||
|
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
|
||||||
|
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
||||||
|
run keyword if "${SourceType}"=="Name" run keywords sleep 1
|
||||||
|
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[3]
|
||||||
|
run keyword if "${SourceType}"=="Action" run keywords sleep 1
|
||||||
|
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[4]
|
||||||
|
sleep 1
|
||||||
|
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${SourceValue}
|
||||||
|
sleep 1
|
||||||
|
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[1]/span/div/i
|
||||||
|
sleep 1
|
||||||
|
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
|
||||||
|
sleep 1
|
||||||
|
|
||||||
|
EditButton
|
||||||
Create-Conditions
|
|
||||||
sleep 2
|
|
||||||
click element id=interceptionadd_object
|
|
||||||
|
|
||||||
Create-Conditions-ip
|
|
||||||
[Arguments] ${objname}
|
|
||||||
sleep 2
|
|
||||||
click element id=interceptionadd_procolall1
|
|
||||||
sleep 2
|
|
||||||
SecurityPolicy.SelectOne ${objname}
|
|
||||||
|
|
||||||
Create-Conditions-sub
|
|
||||||
[Arguments] ${objname}
|
|
||||||
sleep 2
|
|
||||||
click element id=interceptionadd_procolall2
|
|
||||||
sleep 2
|
|
||||||
SecurityPolicy.SelectOne ${objname}
|
|
||||||
|
|
||||||
Create-Conditions-protocol
|
|
||||||
[Arguments] ${protocol}
|
|
||||||
sleep 2
|
|
||||||
click element id=interceptionadd_procolall3
|
|
||||||
sleep 2
|
|
||||||
run keyword if '${protocol}'=='http' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange0
|
|
||||||
... ELSE IF '${protocol}'=='ssl' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange1
|
|
||||||
... ELSE IF '${protocol}'=='dns' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange2
|
|
||||||
... ELSE IF '${protocol}'=='mail' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange3
|
|
||||||
... ELSE IF '${protocol}'=='ftp' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange4
|
|
||||||
... ELSE log 协议内容错误
|
|
||||||
|
|
||||||
Create-Conditions-Search
|
|
||||||
[Arguments] ${Search}
|
|
||||||
input text xpath=//*[@id="proxy"]/div[5]/div[2]/div[2]/div/div[1]/input ${Search}
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
Create-Conditions-Close
|
|
||||||
click button id=interceptionadd_allcancelobject
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
Create-Tag
|
|
||||||
|
|
||||||
Create-EffectiveDevices
|
|
||||||
|
|
||||||
Create-Schedule
|
|
||||||
|
|
||||||
Create-Log Session
|
|
||||||
|
|
||||||
Create-Description
|
|
||||||
|
|
||||||
Create-Enabled
|
|
||||||
[Arguments] ${state}
|
|
||||||
sleep 2
|
|
||||||
run keyword if "${state}"=="open" run keywords click element id=enablencheck_swith
|
|
||||||
... AND sleep 2
|
|
||||||
... AND click button id=interceptionadd-enable-confirm
|
|
||||||
|
|
||||||
Create-ok
|
|
||||||
execute javascript document.documentElement.scrollTop=1000
|
|
||||||
sleep 2
|
|
||||||
click button id=interceptionadd_sub
|
|
||||||
sleep 1
|
sleep 1
|
||||||
execute javascript document.documentElement.scrollTop=0
|
click element xpath=//*[@id="appEdit"]/span/div/div[2]
|
||||||
|
|
||||||
Create-cancel
|
|
||||||
click button id=interceptionadd_back
|
|
||||||
|
|
||||||
Create-Conditions-obj
|
|
||||||
[Arguments] ${action} ${protocol} ${objtype} ${objname} ${objtype1}=null
|
|
||||||
run keyword if '${action}'=='allow' and '${protocol}'=='http' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange0
|
|
||||||
... AND Create-Conditions-allow&intercept-http ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='intercept' and '${protocol}'=='http' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange0
|
|
||||||
... AND Create-Conditions-allow&intercept-http ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='allow' and '${protocol}'=='ssl' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange1
|
|
||||||
... AND Create-Conditions-allow&intercept-ssl ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='intercept' and '${protocol}'=='ssl' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange1
|
|
||||||
... AND Create-Conditions-allow&intercept-ssl ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='deny' and '${protocol}'=='http' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange0
|
|
||||||
... AND Create-Conditions-deny&monitor-http ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='monitor' and '${protocol}'=='http' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange0
|
|
||||||
... AND Create-Conditions-deny&monitor-http ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='deny' and '${protocol}'=='ssl' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange1
|
|
||||||
... AND Create-Conditions-deny&monitor-ssl ${objtype1} ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='monitor' and '${protocol}'=='ssl' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange1
|
|
||||||
... AND Create-Conditions-deny&monitor-ssl ${objtype1} ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='deny' and '${protocol}'=='dns' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange2
|
|
||||||
... AND Create-Conditions-deny&monitor-dns ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='monitor' and '${protocol}'=='dns' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange2
|
|
||||||
... AND Create-Conditions-deny&monitor-dns ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='deny' and '${protocol}'=='mail' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange3
|
|
||||||
... AND Create-Conditions-deny&monitor-mail ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='monitor' and '${protocol}'=='mail' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange3
|
|
||||||
... AND Create-Conditions-deny&monitor-mail ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='deny' and '${protocol}'=='ftp' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange4
|
|
||||||
... AND Create-Conditions-deny&monitor-ftp ${objtype} ${objname}
|
|
||||||
... ELSE IF '${action}'=='monitor' and '${protocol}'=='ftp' run keywords sleep 1
|
|
||||||
... AND click element id=interceptionadd_prochange4
|
|
||||||
... AND Create-Conditions-deny&monitor-ftp ${objtype} ${objname}
|
|
||||||
... ELSE log 对象错误
|
|
||||||
|
|
||||||
Create-Conditions-allow&intercept-http
|
|
||||||
[Arguments] ${objtype} ${objname}
|
|
||||||
sleep 2
|
|
||||||
run keyword if '${objtype}'=='Fqdn' run keywords click element xpath=//*[@id="interceptionadd_pro0"]/div[2]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='Category' run keywords click element xpath=//*[@id="interceptionadd_pro0"]/div[3]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE log 对象错误
|
|
||||||
SecurityPolicy.SelectOne ${objname}
|
|
||||||
|
|
||||||
Create-Conditions-allow&intercept-ssl
|
|
||||||
[Arguments] ${objtype} ${objname}
|
|
||||||
sleep 2
|
|
||||||
run keyword if '${objtype}'=='Fqdn' run keywords click element xpath=//*[@id="interceptionadd_pro0"]/div[2]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='Category' run keywords click element xpath=//*[@id="interceptionadd_pro0"]/div[3]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE log 对象错误
|
|
||||||
SecurityPolicy.SelectOne ${objname}
|
|
||||||
|
|
||||||
Create-Conditions-deny&monitor-http
|
|
||||||
[Arguments] ${objtype} ${objname}
|
|
||||||
sleep 2
|
|
||||||
run keyword if '${objtype}'=='Fqdn' run keywords click element xpath=//*[@id="interceptionadd_pro0"]/div[2]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='Category' run keywords click element xpath=//*[@id="interceptionadd_pro0"]/div[3]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='Url' run keywords click element id=interceptionadd_pro1
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='Reqhdr' run keywords click element id=interceptionadd_pro2
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='Reshdr' run keywords click element id=interceptionadd_pro3
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='Reqbody' run keywords click element id=interceptionadd_pro4
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='Resbody' run keywords click element id=interceptionadd_pro5
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE log 对象错误
|
|
||||||
SecurityPolicy.SelectOne ${objname}
|
|
||||||
|
|
||||||
Create-Conditions-deny&monitor-ssl
|
|
||||||
[Arguments] ${objtype1} ${objtype} ${objname}
|
|
||||||
sleep 2
|
|
||||||
run keyword if '${objtype1}'=='sni' and '${objtype}'=='Fqdn' run keywords click element xpath=//*[@id="interceptionadd_pro0"]/div[2]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype1}'=='sni' and '${objtype}'=='Category' run keywords click element xpath=//*[@id="interceptionadd_pro0"]/div[3]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF ${objtype1}'=='cn' and ${objtype}'=='Fqdn' run keywords click element id=interceptionadd_pro1
|
|
||||||
... AND sleep 2
|
|
||||||
... AND click element xpath=//*[@id="interceptionadd_pro1"]/div[2]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF ${objtype1}'=='cn' and${objtype}'=='Category' run keywords click element id=interceptionadd_pro1
|
|
||||||
... AND sleep 2
|
|
||||||
... AND click element xpath=//*[@id="interceptionadd_pro1"]/div[3]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF ${objtype1}'=='san' and ${objtype}'=='Fqdn' run keywords click element id=interceptionadd_pro2
|
|
||||||
... AND sleep 2
|
|
||||||
... AND click element xpath=//*[@id="interceptionadd_pro2"]/div[2]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF ${objtype1}'=='san' and ${objtype}'=='Category' run keywords click element id=interceptionadd_pro2
|
|
||||||
... AND sleep 2
|
|
||||||
... AND click element xpath=//*[@id="interceptionadd_pro2"]/div[3]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE log 对象错误
|
|
||||||
SecurityPolicy.SelectOne ${objname}
|
|
||||||
|
|
||||||
Create-Conditions-deny&monitor-dns
|
|
||||||
[Arguments] ${objtype} ${objname}
|
|
||||||
sleep 2
|
|
||||||
run keyword if '${objtype}'=='Fqdn' run keywords click element xpath=//*[@id="interceptionadd_pro0"]/div[2]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='Category' run keywords click element xpath=//*[@id="interceptionadd_pro0"]/div[3]
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE log 对象错误
|
|
||||||
SecurityPolicy.SelectOne ${objname}
|
|
||||||
|
|
||||||
Create-Conditions-deny&monitor-mail
|
|
||||||
[Arguments] ${objtype} ${objname}
|
|
||||||
sleep 2
|
|
||||||
run keyword if '${objtype}'=='Subject' run keywords click element id=interceptionadd_pro0
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='Content' run keywords click element id=interceptionadd_pro1
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='ATT Name' run keywords click element id=interceptionadd_pro2
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='ATT CONT' run keywords click element id=interceptionadd_pro3
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='From' run keywords click element id=interceptionadd_pro4
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='To' run keywords click element id=interceptionadd_pro5
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='Account' run keywords click element id=interceptionadd_pro6
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE log 对象错误
|
|
||||||
SecurityPolicy.SelectOne ${objname}
|
|
||||||
|
|
||||||
Create-Conditions-deny&monitor-ftp
|
|
||||||
[Arguments] ${objtype} ${objname}
|
|
||||||
sleep 2
|
|
||||||
run keyword if '${objtype}'=='url' run keywords click element id=interceptionadd_pro0
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='content' run keywords click element id=interceptionadd_pro1
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE IF '${objtype}'=='account' run keywords click element id=interceptionadd_pro2
|
|
||||||
... AND sleep 2
|
|
||||||
... ELSE log 对象错误
|
|
||||||
SecurityPolicy.SelectOne ${objname}
|
|
||||||
|
|
||||||
SelectOne
|
|
||||||
[Arguments] ${objname}
|
|
||||||
sleep 2
|
|
||||||
log ${objname}
|
|
||||||
input text xpath=//*[@id="condistions_protocol"]/div[2]/div[2]/div/div[1]/input ${objname}
|
|
||||||
sleep 1
|
sleep 1
|
||||||
press keys xpath=//*[@id="condistions_protocol"]/div[2]/div[2]/div/div[1]/input ENTER
|
|
||||||
sleep 2
|
Initialize-Policie
|
||||||
click element xpath=//*[@id="interceptionadd_checkouobject"]/ul/li[1]
|
[Arguments] ${InitializeAction}
|
||||||
|
[Documentation] 调用次关键字前需要添加必填参数:
|
||||||
|
... ${InitializeAction}:根据用例进行填写,意思就是是那一个action就不要点击哪一个,以免初始化失败
|
||||||
|
run keyword if "${InitializeAction}"=="Allow" run keywords sleep 1
|
||||||
|
... AND click element id=security_action_deny
|
||||||
|
... AND sleep 1
|
||||||
|
... ELSE IF "${InitializeAction}"=="Deny" run keywords sleep 1
|
||||||
|
... AND click element id=security_action_allow
|
||||||
|
... ELSE IF "${InitializeAction}"=="Monitor" run keywords sleep 1
|
||||||
|
... AND click element id=security_action_deny
|
||||||
|
... ELSE IF "${InitializeAction}"=="Intercept" run keywords sleep 1
|
||||||
|
... AND click element id=security_action_deny
|
||||||
|
... ELSE log 不修改
|
||||||
|
sleep 1
|
||||||
|
${status} Run Keyword And Return Status Page should contain element /html/body/div[1]/div/div[3]/div[2]/div/div[1]/form[1]/div/div[4]/div[1]/div/div/div #判断页面是否包含该元素
|
||||||
|
run keyword if "${status}"=="False" log go on
|
||||||
|
run keyword if "${status}"=="True" run keywords sleep 1
|
||||||
|
... AND click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form[1]/div/div[4]/div[1]/div/div/div/p/span/span/i[2]
|
||||||
|
... AND sleep 1
|
||||||
|
${status1} Run Keyword And Return Status Page should contain element /html/body/div[1]/div/div[3]/div[2]/div/div[1]/form[1]/div/div[5]/div[1]/div/div/div #判断页面是否包含该元素
|
||||||
|
run keyword if "${status1}"=="False" log go on
|
||||||
|
run keyword if "${status1}"=="True" run keywords sleep 1
|
||||||
|
... 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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user