1、提交objects优化关键字(已完成)

2、提交安全策略关键字(未完成)
This commit is contained in:
lyf
2021-01-22 18:44:47 +08:00
parent 070594503a
commit 58d895c978
3 changed files with 735 additions and 270 deletions

View File

@@ -61,13 +61,24 @@ Create-item
... AND Create-ip-ClientIP-text ${ipclienttext1} ${post}
run keyword if "${objectform}"=="IP" and "${ip_type}"=="Geography" run keywords click element id=objectAdd_ip1
... AND sleep 1
... AND click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[2]/div/form/div[4]/div/div[1]/div[2]
... AND click element //*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div[1]/div[2]
... AND sleep 1
... AND click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[2]/div/form/div[4]/div/div[1]/div[1]/div[3]
... AND Create-Geography ${Country} ${City}
... AND sleep 1
... AND click element id=interceptionadd_allcancelobject
... AND click element id=interceptionadd_allcancelobjec3t
... AND sleep 1
run keyword if "${objectform}"=="IP" and "${ip_type}"=="IPLearning" run keywords click element id=objectAdd_ip2
... AND sleep 1
... AND click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div[1]
... AND sleep 1
... AND input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div[4]/div/div[1]/div[2]/div[1]/div[1]/form/div[1]/div/div[1]/input ${fqdn}
... AND click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[1]/div/div/div[2]
... AND Learn-From-Protocols ${Protocols1}
... AND Learning-Depth ${Degree}
... AND input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[3]/div/div[1]/input ${times}
... 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}
run keyword if "${objectform}"=="FQDN" or "${objectform}"=="URL" or "${objectform}"=="Account" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div[1]
... AND sleep 1
... AND Create-keyword-text ${objectform} ${keywordtext}
@@ -98,17 +109,17 @@ Create-item--groupadd
# Click element xpath=//*[@id="el-popover-2756"]/div[1]/div[2]/div/div[8]/div
run keyword if "${objectform}"=="IP" and "${ip_type}"=="Ip" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[2]/div[2]/div/form/div[4]/div/div[1]
run keyword if "${objectform}"=="IP" and "${ip_type}"=="Ip" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div/div[2]
... AND sleep 1
... AND Create-ip-ClientIP-text ${ipclienttext1} ${post}
run keyword if "${objectform}"=="IP" and "${ip_type}"=="Geography" run keywords click element xpath=//*[@id="objectAdd_geography"]
run keyword if "${objectform}"=="IP" and "${ip_type}"=="Geography" run keywords click element id=objectAdd_ip1
... AND sleep 1
... AND click element id=objectAddItemAdd
... AND click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div/div[2]
... AND sleep 1
... AND Create-Geography ${Country} ${City}
... AND sleep 1
... AND click element id=interceptionadd_allcancelobject
... AND sleep 1
... AND click element id=interceptionadd_allcancelobjec3t
... AND sleep 1
run keyword if "${objectform}"=="FQDN" or "${objectform}"=="SubscriberID" or "${objectform}"=="URL" or "${objectform}"=="Category" or "${objectform}"=="Account" run keywords click element xpath=//*[@id="objects_ip3"]/div[1]/div[2]/form/div[3]/div/div[1]/div[2]/p[2]
... AND sleep 1
... AND Create-keyword-text-group ${objectform} ${keywordtext}
@@ -127,7 +138,29 @@ Create-item--groupadd
... AND Create-ReqRes-hexmode ${hex}
... AND Create-item-ok ${objectform}
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[6]/div[1]/div[1]/ul/li[1]
run keyword if "${Protocols1}"=="SSL" run keywords sleep 1
... AND click element xpath=/html/body/div[6]/div[1]/div[1]/ul/li[2]
run keyword if "${Protocols1}"=="HTTPSSL" run keywords sleep 1
... AND click element xpath=/html/body/div[6]/div[1]/div[1]/ul/li[1]
... AND sleep 1
... AND click element xpath=/html/body/div[6]/div[1]/div[1]/ul/li[2]
Learning-Depth
[Arguments] ${Degree}
[Documentation] 调用次关键字前需要添加必填参数:
... ${Degree}:填入1Degree或2Degree
... 判断是用1Degree或2Degree
run keyword if "${Degree}"=="1Degree" run keywords sleep 1
... AND click element xpath=//*[@id="policy_Manipulation2"]/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=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[5]/div[2]/div/div/label[2]
swatches_btn
Create-item-Add
[Arguments] ${Type}
@@ -649,7 +682,7 @@ Cerate-Group-groupadd
... AND Create-ok-groupadd
... AND Create-Sub-Objects ${object_name}
Create-Sub-Objects-groupadd
[Arguments] ${buildType} ${groupaddType} ${name} ${objectform} ${groupadd} ${object_name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader}
[Arguments] ${buildType} ${groupaddType} ${name} ${objectform} ${groupadd} ${object_name} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader}
... ${post} ${Country} ${City}
sleep 1
click element id=objectAddSubAdd1
@@ -658,7 +691,7 @@ Create-Sub-Objects-groupadd
Create-name-groupadd ${name}
${groupadd} Set Variable close
run keyword if "${groupaddType}"=="singletype" NewObject.Create-item--groupadd ${buildType} ${name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
run keyword if "${groupaddType}"=="grouptype" NewObject.Cerate-Group-groupadd ${buildType} ${name} ${objectform} ${groupadd} ${object_name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
run keyword if "${groupaddType}"=="grouptype" NewObject.Cerate-Group-groupadd ${buildType} ${name} ${objectform} ${groupadd} ${object_name} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
Select-ip_type-group
@@ -666,7 +699,7 @@ Select-ip_type-group
run keyword if "${ip_type}"=="Ip" sleep 1
run keyword if "${ip_type}"=="Geography" run keywords sleep 1
... AND click element xpath=//*[@id="objects_ip3"]/div[1]/div[2]/form/div[3]/div/div/label[2]
... AND click element id=objectAdd_ip1
... AND sleep 1
Select-ip_type
[Arguments] ${ip_type}