791 lines
41 KiB
Plaintext
791 lines
41 KiB
Plaintext
*** Settings ***
|
|
Library Selenium2Library
|
|
|
|
*** Keywords ***
|
|
CreateButton
|
|
[Arguments] ${buildType}
|
|
Wait Until Element Is Enabled id=objectCreate
|
|
sleep 3
|
|
Click element id=objectCreate
|
|
run keyword if "${buildType}"=="single" run keywords sleep 2
|
|
... AND Click element id=objectaddress
|
|
... ELSE IF "${buildType}"=="group" run keywords sleep 2
|
|
... AND Click element id=objectaddress_group
|
|
... ELSE IF log 对象类型有误
|
|
CreateButton-groupadd
|
|
[Arguments] ${buildType}
|
|
run keyword if "${buildType}"=="singletype" run keywords sleep 2
|
|
... AND Click element id=objectaddress
|
|
... ELSE IF "${buildType}"=="grouptype" run keywords sleep 2
|
|
... AND Click element id=objectaddress_group
|
|
... ELSE IF log 对象类型有误
|
|
SelectObj
|
|
[Arguments] ${objectform}
|
|
run keyword if "${objectform}"=="HTTPSignature" run keywords sleep 2
|
|
... AND Click element xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/ul/li[4]
|
|
... ELSE IF "${objectform}"=="IP" run keywords sleep 2
|
|
... AND Click element xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/ul/li[1]
|
|
... ELSE IF "${objectform}"=="FQDN" run keywords sleep 2
|
|
... AND Click element xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/ul/li[2]
|
|
... ELSE IF "${objectform}"=="SubscriberID" run keywords sleep 2
|
|
... AND Click element xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/ul/li[3]
|
|
... ELSE IF "${objectform}"=="Key" run keywords sleep 2
|
|
... AND Click element xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/ul/li[5]
|
|
... ELSE IF "${objectform}"=="URL" run keywords sleep 2
|
|
... AND Click element xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/ul/li[6]
|
|
... ELSE IF "${objectform}"=="Category" run keywords sleep 2
|
|
... AND Click element xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/ul/li[7]
|
|
... ELSE IF "${objectform}"=="Account" run keywords sleep 2
|
|
... AND Click element xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/ul/li[8]
|
|
... ELSE IF log 对象类型有误
|
|
|
|
|
|
Create-name
|
|
[Arguments] ${objName}
|
|
sleep 2
|
|
input text id=objectAdd_name ${objName}
|
|
Create-name-groupadd
|
|
[Arguments] ${objName}
|
|
sleep 2
|
|
input text xpath=//*[@id="objects_ip3"]/div[1]/div[2]/form/div[1]/div/div[1]/input ${objName}
|
|
Create-item
|
|
|
|
[Arguments] ${buildType} ${name} ${objectform} ${ip_type} ${ipclienttext1}
|
|
... ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
|
|
# Click element id=swatches_btn
|
|
# 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[1]/div[1]/div[2]/form/div[4]/div/div[1]
|
|
... AND sleep 1
|
|
... 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 //*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div[1]/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Geography ${Country} ${City}
|
|
... AND sleep 1
|
|
... 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}
|
|
... AND sleep 1
|
|
... AND Create-item-ok ${objectform}
|
|
run keyword if '${objectform}'=='Key' 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-Key-text ${keywordtext}
|
|
... AND Create-Key-hexmode ${hex}
|
|
... AND Create-item-ok ${objectform}
|
|
run keyword if '${objectform}'=='HTTPSignature' run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div[1]/i
|
|
... AND sleep 1
|
|
... AND Create-ReqRes-type ${reqrestype}
|
|
... AND Create-ReqRes-header ${reqrestype} ${reqresheader}
|
|
... AND Create-ReqRes-text ${keywordtext}
|
|
... AND Create-ReqRes-hexmode ${hex}
|
|
... AND Create-item-ok ${objectform}
|
|
run keyword if '${objectform}'=='SubscriberID' run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div[1]/i
|
|
... AND sleep 1
|
|
... AND Create-SubscriberID-text ${keywordtext}
|
|
... AND sleep 1
|
|
|
|
Create-item--groupadd
|
|
|
|
[Arguments] ${buildType} ${name} ${objectform} ${ip_type} ${ipclienttext1}
|
|
... ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
|
|
# Click element id=swatches_btn
|
|
# 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[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 id=objectAdd_ip1
|
|
... AND sleep 1
|
|
... 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_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}
|
|
... AND sleep 1
|
|
... AND Create-item-ok ${objectform}
|
|
run keyword if '${objectform}'=='Key' run keywords click element id=objectAddItemAdd
|
|
... AND sleep 1
|
|
... AND Create-Key-text ${keywordtext}
|
|
... AND Create-Key-hexmode ${hex}
|
|
... AND Create-item-ok ${objectform}
|
|
run keyword if '${objectform}'=='HTTPSignature' run keywords click element id=objectAddItemAdd
|
|
... AND sleep 1
|
|
... AND Create-ReqRes-type ${reqrestype}
|
|
... AND Create-ReqRes-header ${reqrestype} ${reqresheader}
|
|
... AND Create-ReqRes-text ${keywordtext}
|
|
... 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}
|
|
|
|
click element id=objectAddItem${Type}Add
|
|
|
|
Create-item-ok
|
|
[Arguments] ${Type}
|
|
sleep 2
|
|
run keyword if "${Type}"=="Category" or "${Type}"=="FQDN" click element id=objectAddItemFqdnOk
|
|
... ELSE IF "${Type}"=="Account" click element id=objectItemAccountOk
|
|
... ELSE IF "${Type}"=="SubscriberID" click element id=objectAddItemSubOk
|
|
... ELSE IF "${Type}"=="Key" click element id=objectAddItemKeyOk
|
|
... ELSE IF "${Type}"=="URL" click element id=objectAddItemUrlOk
|
|
... ELSE click element id=objectAddItemReqResOk
|
|
Create-item-Cancel
|
|
[Arguments] ${Type}
|
|
sleep 2
|
|
run keyword if "${Type}"=="Category" or "${Type}"=="FQDN" click element id=objectAddItemFqdnCancel
|
|
... ELSE IF "${Type}"=="Account" click element id=objectItemAccountCancel
|
|
... ELSE IF "${Type}"=="SubscriberID" click element id=objectAddItemSubCancel
|
|
... ELSE IF "${Type}"=="Key" click element id=objectAddItemKeyCancel
|
|
... ELSE IF "${Type}"=="URL" click element id=objectAddItemUrlCancel
|
|
... ELSE click element id=objectAddItemReqResCancel
|
|
|
|
Create-ip-Protocol
|
|
[Arguments] ${Protocol}
|
|
run keyword if ${Protocol}=="any" click element id=objectItemIpProtocol10
|
|
... ELSE IF ${Protocol}=="tcp" click element id=objectItemIpProtocol20
|
|
... ELSE IF ${Protocol}=="udp" click element id=objectItemIpProtocol30
|
|
|
|
Create-ip-Directed
|
|
[Arguments] ${Directed}
|
|
run keyword if ${Directed}=="no" click element id=objectItemIpDirection10
|
|
... ELSE IF ${Directed}=="yes" click element id=objectItemIpDirection20
|
|
|
|
Create-ip-ClientIP
|
|
[Arguments] ${clientIPType}
|
|
sleep 2
|
|
click element id=object_ip_sourecip0
|
|
sleep 2
|
|
run keyword if "${clientIPType}"=="range" run keywords sleep 1
|
|
... AND click element id=range0Range0111111
|
|
... ELSE IF "${clientIPType}"=="cidr" run keywords sleep 1
|
|
... AND click element id=CIDR0CIDR1
|
|
... ELSE IF "${clientIPType}"=="masks" run keywords sleep 1
|
|
... AND click element id=mask0Masks2
|
|
... ELSE IF log 选择错误
|
|
sleep 2
|
|
|
|
Create-ip-ClientIP-text
|
|
[Arguments] ${clientIPStart} ${port}=null
|
|
sleep 2
|
|
input text id=temporary_ip0 ${clientIPStart}
|
|
sleep 2
|
|
input text id=temporary_port0 ${port}
|
|
sleep 1
|
|
#click element id=objectAdd_description
|
|
|
|
Create-ip-ClientPort
|
|
|
|
Create-ip-ClientPort-text
|
|
|
|
Create-ip-ServerIP
|
|
|
|
Create-ip-ServerPort
|
|
|
|
Create-subobjects
|
|
click element id=objectAddSubAdd
|
|
|
|
Create-Description
|
|
[Arguments] ${objDesc}
|
|
input text id=objectAdd_description ${objDesc}
|
|
|
|
Create-ok
|
|
sleep 2
|
|
click button id=objectAdd_ok
|
|
Create-ok-groupadd
|
|
sleep 1
|
|
click button xpath=//*[@id="objects_ip3"]/div[14]/button[1]
|
|
|
|
Create-cancel
|
|
click button id=objectAdd_cancel
|
|
|
|
SelectOne
|
|
sleep 3
|
|
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
|
|
|
|
UpButton
|
|
click button id=objectEdit
|
|
|
|
DeleteButton
|
|
click button id=objectDel
|
|
|
|
Delete-delete
|
|
sleep 2
|
|
click button xpath=/html/body/div/div/div[3]/button[2]
|
|
|
|
Delete-cancel
|
|
click button xpath=/html/body/div[2]/div/div[3]/button[1]
|
|
|
|
UpName
|
|
[Arguments] ${name}
|
|
clear element text id=objectAdd_name
|
|
input text id=objectAdd_name ${name}
|
|
|
|
UpOk
|
|
click button id=objectAdd_ok
|
|
|
|
UploadButton
|
|
sleep 3
|
|
click button id=objectImport
|
|
|
|
ExportButton
|
|
sleep 3
|
|
click button id=objectExport
|
|
|
|
Upload-name
|
|
[Arguments] ${name}
|
|
sleep 2
|
|
input text xpath=//*[@id="app"]/div/div[3]/div/div/div[14]/div/div[1]/div[1]/div/input ${name}
|
|
|
|
Upload-objectType
|
|
click button id=object_select_Import
|
|
sleep 2
|
|
click element xpath=/html/body/div[2]/div[1]/div[1]/ul/li[1]
|
|
|
|
Upload-uploadedFile
|
|
[Arguments] ${ads}
|
|
sleep 3
|
|
Choose File xpath=//*[@id="app"]/div/div[3]/div/div/div[14]/div/div[2]/div/div[1]/input ${ads}
|
|
|
|
Upload-ok
|
|
click button id=objectUploadedOk
|
|
|
|
Export-objectType
|
|
[Arguments] ${objType}
|
|
sleep 3
|
|
click element css=.logo
|
|
run keyword if "${objType}"=="ip" run keywords sleep 2
|
|
... AND click element xpath=/html/body/div[2]/div[1]/div[1]/ul/li[1]
|
|
... ELSE IF "${objType}"=="fqdn" run keywords sleep 2
|
|
... AND Click element xpath=/html/body/div[2]/div[1]/div[1]/ul/li[2]
|
|
... ELSE IF "${objType}"=="subscriberid" run keywords sleep 2
|
|
... AND Click element xpath=/html/body/div[2]/div[1]/div[1]/ul/li[3]
|
|
... ELSE IF "${objType}"=="httpsignature" run keywords sleep 2
|
|
... AND Click element xpath=/html/body/div[2]/div[1]/div[1]/ul/li[4]
|
|
... ELSE IF "${objType}"=="keywords" run keywords sleep 2
|
|
... AND Click element xpath=/html/body/div[2]/div[1]/div[1]/ul/li[5]
|
|
... ELSE IF "${objType}"=="url" run keywords sleep 2
|
|
... AND Click element xpath=/html/body/div[2]/div[1]/div[1]/ul/li[6]
|
|
... ELSE IF "${objType}"=="category" run keywords sleep 2
|
|
... AND Click element xpath=/html/body/div[2]/div[1]/div[1]/ul/li[7]
|
|
... ELSE IF "${objType}"=="account" run keywords sleep 2
|
|
... AND Click element xpath=/html/body/div[2]/div[1]/div[1]/ul/li[8]
|
|
|
|
Export-format
|
|
[Arguments] ${filetype}
|
|
sleep 2
|
|
click element id=object_select_export
|
|
run keyword if "${filetype}"=="txt" run keywords sleep 2
|
|
... AND click element xpath=/html/body/div[3]/div[1]/div[1]/ul/li[1]
|
|
... ELSE IF "${filetype}"=="csv" run keywords sleep 2
|
|
... AND click element xpath=/html/body/div[3]/div[1]/div[1]/ul/li[2]
|
|
|
|
Export-ok
|
|
click button id=objectImportOk
|
|
|
|
Export-cancel
|
|
click button id=objectImportCancel
|
|
|
|
Create-keyword-text
|
|
[Arguments] ${type} ${keywordtext}
|
|
sleep 1
|
|
run keyword if "${type}"=="FQDN" run keywords sleep 1
|
|
... AND input text id=object_fqdn0 ${keywordtext}
|
|
... ELSE IF "${type}"=="URL" run keywords sleep 1
|
|
... AND input text id=object_url00 ${keywordtext}
|
|
... ELSE IF "${type}"=="Category" run keywords sleep 1
|
|
... AND input text id=object_fqdn0 ${keywordtext}
|
|
... ELSE IF "${type}"=="Account" run keywords sleep 1
|
|
... AND input text xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/div[7]/div[1]/div[1]/form/div/div/div/div/div[1]/input ${keywordtext}
|
|
... ELSE log 2
|
|
Create-keyword-text-group
|
|
[Arguments] ${type} ${keywordtext}
|
|
sleep 1
|
|
run keyword if "${type}"=="FQDN" run keywords sleep 1
|
|
... AND input text id=object_fqdn0 ${keywordtext}
|
|
... ELSE IF "${type}"=="SubscriberID" run keywords sleep 1
|
|
... AND input text id=object_sub0 ${keywordtext}
|
|
... ELSE IF "${type}"=="URL" run keywords sleep 1
|
|
... AND input text xpath=/html/body/div[1]/div/div[3]/div/div/div[2]/div[14]/div/div[4]/div[1]/div/form/div/div/div/input ${keywordtext}
|
|
|
|
... ELSE IF "${type}"=="Category" run keywords sleep 1
|
|
... AND input text id=object_fqdn0 ${keywordtext}
|
|
... ELSE IF "${type}"=="Account" run keywords sleep 1
|
|
... AND input text id=object_account0 ${keywordtext}
|
|
... ELSE log 2
|
|
|
|
|
|
Create-ReqRes-type
|
|
[Arguments] ${type}
|
|
sleep 1
|
|
run keyword if '${type}'=='req' click element xpath=//*[@id="objectAddItemReqRes"]/label[1]
|
|
... ELSE IF '${type}'=='res' click element xpath=//*[@id="objectAddItemReqRes"]/label[2]
|
|
sleep 1
|
|
|
|
Create-ReqRes-header
|
|
[Arguments] ${type} ${header}
|
|
sleep 1
|
|
run keyword if '${type}'=='req' and '${header}'=='ua' click element xpath=//*[@id="objectAddItemReqResType1"]/label[1]
|
|
... ELSE IF '${type}'=='req' and '${header}'=='ck' click element xpath=//*[@id="objectAddItemReqResType1"]/label[2]
|
|
... ELSE IF '${type}'=='res'and '${header}'=='sck' click element xpath=//*[@id="objectAddItemReqResType"]/label[1]
|
|
... ELSE IF '${type}'=='res'and '${header}'=='ct' click element xpath=//*[@id="objectAddItemReqResType"]/label[2]
|
|
sleep 1
|
|
|
|
Create-ReqRes-text
|
|
[Arguments] ${keywordtext}
|
|
sleep 1
|
|
input text id=object_sig0 ${keywordtext}
|
|
sleep 1
|
|
|
|
Create-ReqRes-hexmode
|
|
[Arguments] ${hex}
|
|
sleep 1
|
|
run keyword if "${hex}"=="open" click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[4]/div[1]/div[1]/form/div/div[4]/div/div/span
|
|
sleep 1
|
|
|
|
Create-Key-text
|
|
[Arguments] ${keywordtext}
|
|
sleep 1
|
|
input text id=object_url0 ${keywordtext}
|
|
sleep 1
|
|
|
|
Create-Key-hexmode
|
|
[Arguments] ${hex}
|
|
sleep 1
|
|
run keyword if "${hex}"=="open" click element xpath=//*[@id="objects_httpBodyKeywords1"]/div[1]/div[1]/form/div/div[2]/div/div
|
|
sleep 1
|
|
|
|
Create-SubscriberID-text
|
|
[Arguments] ${keywordtext}
|
|
sleep 1
|
|
input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div[3]/div[1]/div[1]/div[2]/div[1]/div/form/div[1]/div/div[1]/input ${keywordtext}
|
|
sleep 1
|
|
|
|
objects-delete
|
|
sleep 1
|
|
click element id=objectDel #点击删除按钮
|
|
sleep 1
|
|
click element xpath=/html/body/div/div/div[3]/button[2]
|
|
#Close Browser #关闭浏览器
|
|
|
|
object-edit-fqdn
|
|
[Arguments] ${name} ${keywordtext}
|
|
Sleep 2
|
|
click element id=objectEdit
|
|
Sleep 2
|
|
NewObject.Create-name ${name}
|
|
Sleep 1
|
|
click element id=editForm0
|
|
Sleep 1
|
|
input text id=object_fqdn0${name} ${keywordtext}
|
|
Sleep 1
|
|
click element id=objectAddItemFqdnOk
|
|
Sleep 1
|
|
click element id=objectAdd_ok
|
|
Sleep 2
|
|
|
|
object-edit-Subscriber-ID
|
|
[Arguments] ${name} ${keywordtext}
|
|
Sleep 2
|
|
click element id=objectEdit
|
|
Sleep 2
|
|
NewObject.Create-name ${name}
|
|
Sleep 1
|
|
click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div[4]/div[1]/div[1]/div[2]/div[1]/div[2]/div/div[2]/i[1]
|
|
Sleep 1
|
|
input text xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div[4]/div[1]/div[1]/div[2]/div[1]/div[2]/div/div[1]/form/div/div/div/div[2]/div/input ${keywordtext}
|
|
Sleep 1
|
|
click element id=objectAdd_ok
|
|
Sleep 2
|
|
|
|
object-edit-url
|
|
[Arguments] ${name} ${keywordtext}
|
|
Sleep 2
|
|
click element id=objectEdit
|
|
Sleep 2
|
|
NewObject.Create-name ${name}
|
|
Sleep 1
|
|
click element id=editForm0
|
|
Sleep 1
|
|
input text xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/div[5]/div[1]/div[1]/form/div/div/div/div/div/input ${keywordtext}
|
|
Sleep 1
|
|
click element id=objectAddItemUrlOk
|
|
Sleep 1
|
|
click element id=objectAdd_ok
|
|
Sleep 2
|
|
|
|
object-edit-account
|
|
[Arguments] ${name} ${keywordtext}
|
|
Sleep 2
|
|
click element id=objectEdit
|
|
Sleep 2
|
|
NewObject.Create-name ${name}
|
|
Sleep 1
|
|
click element id=editForm0
|
|
Sleep 1
|
|
input text xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/div[7]/div[1]/div[1]/form/div/div/div/div/div/input ${keywordtext}
|
|
Sleep 1
|
|
click element id=objectItemAccountOk
|
|
Sleep 1
|
|
click element id=objectAdd_ok
|
|
Sleep 2
|
|
|
|
object-edit-keywords
|
|
[Arguments] ${name} ${keywordtext} ${hex}=close
|
|
Sleep 3
|
|
click element id=objectEdit
|
|
Sleep 2
|
|
NewObject.Create-name ${name}
|
|
Sleep 1
|
|
click element id=editForm0
|
|
Sleep 1
|
|
input text id=object_url0${name} ${keywordtext}
|
|
Sleep 1
|
|
NewObject.Create-Key-hexmode ${hex}
|
|
Sleep 1
|
|
click element id=objectAddItemKeyOk
|
|
Sleep 1
|
|
click element id=objectAdd_ok
|
|
Sleep 2
|
|
|
|
ui-object-search-name
|
|
[Arguments] ${name}
|
|
|
|
sleep 2
|
|
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[1]/span/div/div/div[2]/div/div/div/input #点击输入框
|
|
sleep 2
|
|
click element xpath=/html/body/div/div[1]/div[1]/ul/li[3] #点击name为搜索类型
|
|
sleep 2
|
|
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 ${name} #输入搜索内容
|
|
sleep 2
|
|
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[1]/div[1]/span/div/i #点击搜索按钮
|
|
sleep 2
|
|
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div/span #选择搜索到的列表
|
|
sleep 2
|
|
|
|
clear-object-search
|
|
[Arguments] ${type}
|
|
sleep 2
|
|
run keyword if "${type}"=="Key" click element id=sidebarObjects_keywords
|
|
run keyword if "${type}"=="Account" click element id=sidebarObjects_account
|
|
run keyword if "${type}"=="URL" click element id=sidebarObjects_url
|
|
run keyword if "${type}"=="HTTPSignature" click element id=sidebarObjects_http_signature
|
|
run keyword if "${type}"=="SubscriberID" click element id=sidebarObjects_subscriberid
|
|
run keyword if "${type}"=="FQDN" click element id=sidebarObjects_fqdn
|
|
run keyword if "${type}"=="IP" click element id=sidebarObjects_ip
|
|
object-edit-HTTPSignature
|
|
[Arguments] ${name} ${reqrestype} ${reqresheader} ${keywordtext} ${hex}=close
|
|
Sleep 2
|
|
click element id=objectEdit
|
|
Sleep 2
|
|
Create-name ${name}
|
|
Sleep 1
|
|
click element id=editForm0
|
|
Sleep 1
|
|
Create-ReqRes-type ${reqrestype}
|
|
Create-ReqRes-header ${reqrestype} ${reqresheader}
|
|
input text id=object_sig0 ${keywordtext}
|
|
Sleep 1
|
|
Create-ReqRes-hexmode ${hex}
|
|
click element id=objectAddItemReqResOk
|
|
Sleep 1
|
|
click element id=objectAdd_ok
|
|
Sleep 2
|
|
|
|
object-edit-ip
|
|
[Arguments] ${name} ${ipclienttext1} ${post}=null
|
|
Sleep 2
|
|
click element id=objectEdit
|
|
Sleep 2
|
|
Create-name ${name}
|
|
Sleep 1
|
|
click element id=object_editForm_0
|
|
edit-ip-ClientIP-text ${ipclienttext1} ${post}
|
|
Sleep 1
|
|
click element id=objectAdd_ok
|
|
Sleep 2
|
|
object-edit-Geography
|
|
[Arguments] ${name} ${Country} ${City}
|
|
Sleep 2
|
|
click element id=objectEdit
|
|
Sleep 2
|
|
Create-name ${name}
|
|
Sleep 2
|
|
click element xpath=//*[@id="objectAdd_geography"]
|
|
sleep 1
|
|
click element id=objectAddItemAdd
|
|
sleep 1
|
|
Create-Geography ${Country} ${City}
|
|
sleep 1
|
|
click element id=objectAdd_ok
|
|
sleep 1
|
|
edit-ip-ClientIP-text
|
|
[Arguments] ${clientIPStart} ${port}=null
|
|
sleep 2
|
|
run keywords input text id=object_ip_0 ${clientIPStart}
|
|
... AND input text id=object_port_0 ${port}
|
|
... AND sleep 1
|
|
... AND click element id=objectAdd_description
|
|
|
|
|
|
|
|
|
|
Cerate-Group
|
|
[Arguments] ${buildType} ${groupaddType} ${name} ${objectform} ${groupadd} ${object_name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader}
|
|
... ${post} ${Country} ${City}
|
|
|
|
run keyword if "${objectform}"=="IP" and "${groupadd}"!="open" run keywords Select-ip_type ${ip_type}
|
|
... AND sleep 1
|
|
... AND click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div/div[2]
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="IP" and "${groupadd}"=="open" run keywords Select-ip_type ${ip_type}
|
|
... AND sleep 1
|
|
... AND click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[4]/div/div/div[2]
|
|
... AND Create-Sub-Objects-groupadd ${buildType} ${groupaddType} ${name} ${objectform} ${groupadd} ${object_name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
|
|
run keyword if "${objectform}"=="HTTPSignature" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="HTTPSignature" and "${groupadd}"=="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-groupadd ${buildType} ${groupaddType} ${name} ${objectform} ${groupadd} ${object_name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
|
|
... AND sleep 1
|
|
run keyword if "${objectform}"=="FQDN" and "${groupadd}"=="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-groupadd ${buildType} ${groupaddType} ${name} ${objectform} ${groupadd} ${object_name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
|
|
... AND sleep 1
|
|
run keyword if "${objectform}"=="FQDN" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="SubscriberID" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="SubscriberID" and "${groupadd}"=="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-groupadd ${buildType} ${groupaddType} ${name} ${objectform} ${groupadd} ${object_name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
|
|
... AND sleep 1
|
|
run keyword if "${objectform}"=="Key" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="Key" and "${groupadd}"=="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-groupadd ${buildType} ${groupaddType} ${name} ${objectform} ${groupadd} ${object_name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
|
|
... AND sleep 1
|
|
run keyword if "${objectform}"=="URL" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="URL" and "${groupadd}"=="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-groupadd ${buildType} ${groupaddType} ${name} ${objectform} ${groupadd} ${object_name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
|
|
... AND sleep 1
|
|
run keyword if "${objectform}"=="Category" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="Category" and "${groupadd}"=="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-groupadd ${buildType} ${groupaddType} ${name} ${objectform} ${groupadd} ${object_name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
|
|
... AND sleep 1
|
|
run keyword if "${objectform}"=="Account" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="Account" and "${groupadd}"=="open" run keywords click element xpath=//*[@id="policy_Manipulation2"]/div[1]/div[1]/div[2]/form/div[3]/div/div/div[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-groupadd ${buildType} ${groupaddType} ${name} ${objectform} ${groupadd} ${object_name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
|
|
... AND sleep 1
|
|
Cerate-Group-groupadd
|
|
[Arguments] ${buildType} ${name} ${objectform} ${groupadd} ${object_name} ${objectform} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader}
|
|
... ${post} ${Country} ${City}
|
|
run keyword if "${objectform}"=="IP" and "${groupadd}"!="open" run keywords Select-ip_type-group ${ip_type}
|
|
... AND click element xpath=//*[@id="objects_ip3"]/div[1]/div[2]/form/div[4]/div/div/div[2]/p[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-group ${object_name}
|
|
... AND Create-ok-groupadd
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="HTTPSignature" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="objects_ip3"]/div[1]/div[2]/form/div[3]/div/div/div[2]/p[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-group ${object_name}
|
|
... AND Create-ok-groupadd
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="FQDN" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="objects_ip3"]/div[1]/div[2]/form/div[3]/div/div/div[2]/p[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-group ${object_name}
|
|
... AND Create-ok-groupadd
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="SubscriberID" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="objects_ip3"]/div[1]/div[2]/form/div[3]/div/div/div[2]/p[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-group ${object_name}
|
|
... AND Create-ok-groupadd
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="Key" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="objects_ip3"]/div[1]/div[2]/form/div[3]/div/div/div[2]/p[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-group ${object_name}
|
|
... AND Create-ok-groupadd
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="URL" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="objects_ip3"]/div[1]/div[2]/form/div[3]/div/div/div[2]/p[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-group ${object_name}
|
|
... AND Create-ok-groupadd
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="Category" and "${groupadd}"!="open" run keywords click element xpath=//*[@id="objects_ip3"]/div[1]/div[2]/form/div[3]/div/div/div[2]/p[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-group ${object_name}
|
|
... AND Create-ok-groupadd
|
|
... AND Create-Sub-Objects ${object_name}
|
|
run keyword if "${objectform}"=="Account" and "${groupadd}"=="open" run keywords click element xpath=//*[@id="objects_ip3"]/div[1]/div[2]/form/div[3]/div/div/div[2]/p[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects-group ${object_name}
|
|
... AND Create-ok-groupadd
|
|
... AND Create-Sub-Objects ${object_name}
|
|
Create-Sub-Objects-groupadd
|
|
[Arguments] ${buildType} ${groupaddType} ${name} ${objectform} ${groupadd} ${object_name} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader}
|
|
... ${post} ${Country} ${City}
|
|
sleep 1
|
|
click element id=objectAddSubAdd1
|
|
sleep 1
|
|
CreateButton-groupadd ${groupaddType}
|
|
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} ${ip_type} ${ipclienttext1} ${keywordtext} ${hex} ${reqrestype} ${reqresheader} ${post} ${Country} ${City}
|
|
|
|
|
|
Select-ip_type-group
|
|
[Arguments] ${ip_type}
|
|
run keyword if "${ip_type}"=="Ip" sleep 1
|
|
|
|
run keyword if "${ip_type}"=="Geography" run keywords sleep 1
|
|
... AND click element id=objectAdd_ip1
|
|
... AND sleep 1
|
|
Select-ip_type
|
|
[Arguments] ${ip_type}
|
|
run keyword if "${ip_type}"=="Ip" sleep 1
|
|
|
|
run keyword if "${ip_type}"=="Geography" run keywords sleep 1
|
|
... AND click element id=objectAdd_ip1
|
|
... AND sleep 1
|
|
Create-Sub-Objects
|
|
[Arguments] ${object_name}
|
|
sleep 1
|
|
FOR ${i} IN @{object_name}
|
|
input text id=objectAddSubSearch ${i}
|
|
sleep 1
|
|
press keys id=objectAddSubSearch ENTER
|
|
sleep 1
|
|
click element xpath=//*[@id="objects_ip2"]/div/div[1]/div[2]/div[3]/ul/li[1]/span/div/span
|
|
sleep 1
|
|
END
|
|
click element id=manipilationn_allcanceltag
|
|
sleep 1
|
|
Create-Sub-Objects-group
|
|
[Arguments] ${object_name}
|
|
sleep 1
|
|
FOR ${i} IN @{object_name}
|
|
input text xpath=//*[@id="objects_ip3"]/div[2]/div/div[1]/div[2]/input ${i}
|
|
sleep 1
|
|
press keys xpath=//*[@id="objects_ip3"]/div[2]/div/div[1]/div[2]/input ENTER
|
|
sleep 1
|
|
click element xpath=//*[@id="objects_ip3"]/div[2]/div/div[1]/div[2]/div[2]/ul/li[1]/span/div/span
|
|
sleep 1
|
|
END
|
|
|
|
# click element xpath=//*[@id="objects_ip3"]/div[14]/button[1]
|
|
|
|
Create-Geography
|
|
[Arguments] ${Country} ${City}
|
|
run keyword if "${Country}"!="null" Create-Country ${Country}
|
|
run keyword if "${City}"!="null" Create-City ${City}
|
|
Create-Country
|
|
[Arguments] ${Country}
|
|
FOR ${i} IN @{Country}
|
|
input text xpath=//*[@id="remoteInput"]/div/div/input ${i}
|
|
sleep 1
|
|
press keys xpath=//*[@id="remoteInput"]/div/div/input ENTER
|
|
sleep 1
|
|
click element xpath=//*[@id="location-tree"]/div[1]/div/label/span
|
|
sleep 1
|
|
END
|
|
Create-City
|
|
[Arguments] ${City}
|
|
sleep 1
|
|
click element id=tab-city
|
|
sleep 1
|
|
FOR ${i} IN @{City}
|
|
input text xpath=//*[@id="remoteInput"]/div/div/input ${i}
|
|
sleep 1
|
|
press keys xpath=//*[@id="remoteInput"]/div/div/input ENTER
|
|
sleep 1
|
|
click element //*[@id="location-tree"]/div[1]/div/label/span
|
|
sleep 1
|
|
END
|
|
Create-AddressGroup-Geography
|
|
[Arguments] ${group} ${ip_type} ${object_name}
|
|
run keyword if "${group}"=="AddressGroup" and "${ip_type}"=="Geography" run keywords sleep 1
|
|
... AND click element xpath=//*[@id="policy_Manipulation2"]/div[2]/div/form/div[3]/div/div/label[2]
|
|
... AND sleep 1
|
|
... AND Create-Sub-Objects ${object_name}
|
|
... AND sleep 1
|
|
run keyword if "${group}"=="AddressGroup" and "${ip_type}"=="Ip" run keywords sleep 1
|
|
... AND Create-Sub-Objects ${object_name}
|
|
Pages
|
|
[Arguments]
|
|
Menu policy&objects Objects
|
|
sleep 3
|
|
|
|
Ui-Pages
|
|
[Arguments] ${pages}
|
|
#click element xpath=//*[@id="app"]/div/div[3]/div/div/div[10]/div/ul/li[1]
|
|
#sleep 2
|
|
#click element xpath=//*[@id="app"]/div/div[3]/div/div/div[10]/div/button[2]
|
|
#sleep 2
|
|
Clear Element Text xpath=//*[@id="app"]/div/div[3]/div/div/div[12]/div/span[2]/div/input
|
|
sleep 2
|
|
input text xpath=//*[@id="app"]/div/div[3]/div/div/div[12]/div/span[2]/div/input ${pages}
|
|
sleep 2
|
|
press keys xpath=//*[@id="app"]/div/div[3]/div/div/div[12]/div/span[2]/div/input ENTER
|
|
sleep 2
|