This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dongxiaoyan-tsg-autotest/02-Keyword/tsg_ui/SecurityPolicy/SourceAndDestination.robot
2021-02-20 15:05:32 +08:00

402 lines
26 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

*** 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 ${sleep}
... 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 ${sleep}
... AND sleep ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... AND SUBIDCreateOrSearch ${policytype} ${name} ${keywordtext} ${object_name}
... ELSE IF "${type1}"=="Geography" run keywords sleep ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... AND sleep ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... AND click element id=interceptionadd_proaddaddSource
... AND SUBIDAdd ${policytype} ${Add} ${name} ${keywordtext} ${object_name}
... ELSE IF "${CreateOrSearch}"=="Search" run keywords sleep ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
press keys xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ENTER
sleep ${sleep}
click element xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[2]/div/div/ul/li[1]
sleep ${sleep}
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 ${sleep}
press keys xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[1]/input ENTER
sleep ${sleep}
click element xpath=${policytype}/div[2]/div[1]/div[2]/div[2]/div/div[2]/div/div/ul/li[1]
sleep ${sleep}
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 ${sleep}
... AND click element xpath=/html/body/ul/li[1]
... AND sleep ${sleep}
... AND SUBAddress ${policytype}${name} ${keywordtext}
... ELSE IF "${Add}"=="Group" run keywords sleep ${sleep}
... AND click element xpath=/html/body/ul/li[2]
... AND sleep ${sleep}
... 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 ${sleep}
Create-SubscriberID-text ${keywordtext}
sleep ${sleep}
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 ${sleep}
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 ${sleep}
... AND click element xpath=/html/body/ul/li[1]
... AND sleep ${sleep}
... AND SourceIPAddress ${policytype} ${name} ${ip_type} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
... ELSE IF "${Add}"=="Group" run keywords sleep ${sleep}
... AND click element xpath=/html/body/ul/li[2]
... AND sleep ${sleep}
... 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 ${sleep}
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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... AND NewObject.Create-Geography ${Country} ${City}
... AND sleep ${sleep}
... AND click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[10]/div/div/div/div[4]/button
... AND sleep ${sleep}
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 ${sleep}
... AND click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1]
... AND sleep ${sleep}
... 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 ${sleep}
... AND click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[1]/div/div/div[2]
... AND sleep ${sleep}
... AND Learn-From-Protocols ${Protocols1}
... AND Learning-Depth ${policytype} ${Degree}
... AND sleep ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
sleep ${sleep}
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 ${sleep}
... AND click element xpath=/html/body/ul[contains(@id,'dropdown-menu' )and @x-placement='bottom-start']/child::li[1]
... AND sleep ${sleep}
... AND DestinationIPAddress ${policytype} ${name} ${ip_type} ${ipclienttext1} ${post} ${Country} ${City} ${Protocols1} ${Degree} ${times} ${numbers} ${limits}
... ELSE IF "${Add}"=="Group" run keywords sleep ${sleep}
... AND click element xpath=/html/body/ul[contains(@id,'dropdown-menu' )and @x-placement='bottom-start']/child::li[2]
... AND sleep ${sleep}
... 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 ${sleep}
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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... AND NewObject.Create-Geography ${Country} ${City}
... AND sleep ${sleep}
... AND click element id=interceptionadd_allcancelobjec3t
... AND sleep ${sleep}
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 ${sleep}
... AND click element xpath=${policytype}/div[2]/div[2]/div/div[1]/div[1]/div[2]/form/div[4]/div/div[1]
... AND sleep ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... AND Learn-From-Protocols ${Protocols1}
... AND Learning-Depth ${policytype} ${Degree}
... AND sleep ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
DestinationCreate-ok ${policytype}
Learn-From-Protocols
[Arguments] ${Protocols1}
[Documentation] 调用次关键字前需要添加必填参数:
... ${Protocols1}:填入HTTP或SSL或者HTTPSSL
... 判断选择用什么样的协议
run keyword if "${Protocols1}"=="HTTP" run keywords sleep ${sleep}
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[1]
run keyword if "${Protocols1}"=="SSL" run keywords sleep ${sleep}
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[2]
run keyword if "${Protocols1}"=="HTTPSSL" run keywords sleep ${sleep}
... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[1]
... AND sleep ${sleep}
... 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 ${sleep}
... 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 ${sleep}
... 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 ${sleep}
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 ${sleep}
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 ${sleep}
input text id=objectAdd_name ${objName}
SourceCreate-ok
sleep ${sleep}
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 ${sleep}
click button xpath=${policytype}/div[2]/div[2]/div/div[2]/button[1]