402 lines
26 KiB
Plaintext
402 lines
26 KiB
Plaintext
|
|
*** Settings ***
|
|||
|
|
Library Selenium2Library
|
|||
|
|
Resource ../objects/NewObject.robot
|
|||
|
|
Resource ../Menu.robot
|
|||
|
|
*** Keywords ***
|
|||
|
|
Create-Source
|
|||
|
|
[Arguments] ${policytype}=null ${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] 调用次关键字前需要添加必填参数:
|
|||
|
|
... ${policytype}:填入安全策略或管控策略或tcp策略中前置元素:安全和代理源:/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[4] 安全和代理目的:/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[5]
|
|||
|
|
... tcp源:/html/body/div[1]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[2]
|
|||
|
|
... tcp目的:/html/body/div[1]/div/div[3]/div[2]/div/div/div[1]/div[1]/div/div[2]/form/div[3]
|
|||
|
|
... ${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=${policytype}/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 ${policytype} ${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=${policytype}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[2]
|
|||
|
|
... AND sleep 1
|
|||
|
|
... AND SUBIDCreateOrSearch ${policytype} ${name} ${keywordtext} ${object_name}
|
|||
|
|
... ELSE IF "${type1}"=="Geography" run keywords sleep 2
|
|||
|
|
... AND click element xpath=${policytype}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[3]
|
|||
|
|
... AND sleep 1
|
|||
|
|
... AND SourceIPCreateOrSearch ${policytype} ${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=${policytype}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[4]
|
|||
|
|
... AND sleep 1
|
|||
|
|
... AND SourceIPCreateOrSearch ${policytype} ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
|
|||
|
|
|
|||
|
|
Create-Destination
|
|||
|
|
[Arguments] ${policytype}=null ${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=${policytype}/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 ${policytype} ${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=${policytype}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[3]
|
|||
|
|
... AND sleep 1
|
|||
|
|
... AND DestinationIPCreateOrSearch ${policytype} ${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=${policytype}/div[2]/div[1]/div[2]/div[1]/div/div/div/div[1]/div/div/div/div[4]
|
|||
|
|
... AND sleep 1
|
|||
|
|
... AND DestinationIPCreateOrSearch ${policytype} ${CreateOrSearch} ${Add} ${type1} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
|
|||
|
|
|
|||
|
|
|
|||
|
|
SourceIPCreateOrSearch
|
|||
|
|
[Arguments] ${policytype} ${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 ${policytype} ${Add} ${ip_type} ${name} ${object_name} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
|
|||
|
|
... ELSE IF "${CreateOrSearch}"=="Search" run keywords sleep 1
|
|||
|
|
... AND SourceSearch ${policytype} ${object_name}
|
|||
|
|
SUBIDCreateOrSearch
|
|||
|
|
[Arguments] ${policytype} ${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 ${policytype} ${Add} ${name} ${keywordtext} ${object_name}
|
|||
|
|
... ELSE IF "${CreateOrSearch}"=="Search" run keywords sleep 1
|
|||
|
|
... AND SourceSearch ${object_name}
|
|||
|
|
DestinationIPCreateOrSearch
|
|||
|
|
[Arguments] ${policytype} ${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 ${policytype} ${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 ${policytype} ${object_name}
|
|||
|
|
SourceSearch
|
|||
|
|
[Arguments] ${policytype} ${name}
|
|||
|
|
[Documentation] 调用次关键字前需要添加必填参数:
|
|||
|
|
... ${name}:填入是一个列表,列表内容为source的name
|
|||
|
|
... 选择search对象
|
|||
|
|
FOR ${i} IN @{name}
|
|||
|
|
input text xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ${i}
|
|||
|
|
sleep 1
|
|||
|
|
press keys xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ENTER
|
|||
|
|
sleep 1
|
|||
|
|
click element xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[2]/div/div/ul/li[1]
|
|||
|
|
sleep 1
|
|||
|
|
END
|
|||
|
|
DestinationSearch
|
|||
|
|
[Arguments] ${policytype} ${name}
|
|||
|
|
[Documentation] 调用次关键字前需要添加必填参数:
|
|||
|
|
... ${name}:填入是一个列表,列表内容为source的name
|
|||
|
|
... 选择search对象
|
|||
|
|
FOR ${i} IN @{name}
|
|||
|
|
input text xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ${i}
|
|||
|
|
sleep 1
|
|||
|
|
press keys xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ENTER
|
|||
|
|
sleep 1
|
|||
|
|
click element xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[2]/div/div/ul/li[1]
|
|||
|
|
sleep 1
|
|||
|
|
END
|
|||
|
|
|
|||
|
|
SUBIDAdd
|
|||
|
|
[Arguments] ${policytype} ${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 ${policytype}${name} ${keywordtext}
|
|||
|
|
... ELSE IF "${Add}"=="Group" run keywords sleep 1
|
|||
|
|
... AND click element xpath=/html/body/ul/li[2]
|
|||
|
|
... AND sleep 1
|
|||
|
|
... AND SUBGroupAdd ${policytype} ${name} ${object_name}
|
|||
|
|
SUBAddress
|
|||
|
|
[Arguments] ${policytype} ${name} ${keywordtext}
|
|||
|
|
[Documentation] 调用次关键字前需要添加必填参数:
|
|||
|
|
... ${name}:名称
|
|||
|
|
... ${keywordtext}:填入新建subid的内容
|
|||
|
|
... 新建subid
|
|||
|
|
SourceCreate-name ${name}
|
|||
|
|
click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[3]/div/div[1]
|
|||
|
|
sleep 1
|
|||
|
|
Create-SubscriberID-text ${keywordtext}
|
|||
|
|
sleep 1
|
|||
|
|
|
|||
|
|
SUBGroupAdd
|
|||
|
|
[Arguments] ${policytype} ${name} ${object_name}
|
|||
|
|
[Documentation] 调用次关键字前需要添加必填参数:
|
|||
|
|
... ${name}:名称
|
|||
|
|
... ${object_name}:列表形式,列表中是对象的名字
|
|||
|
|
... 新建subid分组
|
|||
|
|
SourceCreate-name ${name}
|
|||
|
|
click element xpath=${policytype}/div[2]/div[2]/div/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] ${policytype} ${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 ${policytype} ${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 ${policytype} ${name} ${ip_type} ${object_name}
|
|||
|
|
SourceIPAddress
|
|||
|
|
[Arguments] ${policytype} ${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=${policytype}/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=${policytype}/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=${policytype}/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 xpath=${policytype}/div[2]/div[2]/div/div[1]/div[10]/div/div/div/div[4]/button
|
|||
|
|
... AND sleep 1
|
|||
|
|
run keyword if "${ip_type}"=="IPLearning" run keywords click element xpath=${policytype}/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=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1]
|
|||
|
|
... AND sleep 1
|
|||
|
|
... AND input text xpath=${policytype}/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=//*[@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 ${policytype} ${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 3
|
|||
|
|
SourceCreate-ok
|
|||
|
|
|
|||
|
|
DestinationIPAdd
|
|||
|
|
[Arguments] ${policytype} ${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 ${policytype} ${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 DestinationIPGroupAdd ${policytype} ${name} ${ip_type} ${object_name}
|
|||
|
|
DestinationIPAddress
|
|||
|
|
[Arguments] ${policytype} ${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 ${policytype} ${name}
|
|||
|
|
sleep 1
|
|||
|
|
run keyword if "${ip_type}"=="Ip" run keywords click element xpath=${policytype}/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=${policytype}/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=${policytype}/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=${policytype}/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=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1]
|
|||
|
|
... AND sleep 1
|
|||
|
|
... AND input text xpath=${policytype}/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=${policytype}/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 ${policytype} ${Degree}
|
|||
|
|
... AND sleep 1
|
|||
|
|
... AND input text xpath=${policytype}/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=${policytype}/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=${policytype}/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 ${policytype}
|
|||
|
|
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/div[1]/div[1]/ul/li[1]
|
|||
|
|
run keyword if "${Protocols1}"=="SSL" run keywords sleep 1
|
|||
|
|
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
|||
|
|
run keyword if "${Protocols1}"=="HTTPSSL" run keywords sleep 1
|
|||
|
|
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[1]
|
|||
|
|
... AND sleep 1
|
|||
|
|
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[2]
|
|||
|
|
|
|||
|
|
Learning-Depth
|
|||
|
|
[Arguments] ${policytype} ${Degree}
|
|||
|
|
[Documentation] 调用次关键字前需要添加必填参数:
|
|||
|
|
... ${Degree}:填入1Degree或2Degree
|
|||
|
|
... 判断是用1Degree或2Degree
|
|||
|
|
run keyword if "${Degree}"=="1Degree" run keywords sleep 1
|
|||
|
|
... AND click element xpath=${policytype}/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=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[5]/div[2]/div/div/label[2]
|
|||
|
|
|
|||
|
|
SourceIPGroupAdd
|
|||
|
|
[Arguments] ${policytype} ${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=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div/div[2]
|
|||
|
|
Create-Sub-Objects ${object_name}
|
|||
|
|
NewObject.Create-ok
|
|||
|
|
DestinationIPGroupAdd
|
|||
|
|
[Arguments] ${policytype} ${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=${policytype}/div[2]/div[2]/div/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] ${policytype} ${objName}
|
|||
|
|
input text xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[1]/div/div[1]/input ${objName}
|
|||
|
|
|
|||
|
|
DestinationCreate-ok
|
|||
|
|
[Arguments] ${policytype}
|
|||
|
|
sleep 2
|
|||
|
|
click button xpath=${policytype}/div[2]/div[2]/div/div[2]/button[1]
|