修改创建策略关键字定位

This commit is contained in:
byb11
2021-03-04 10:07:59 +08:00
parent 49eae9ca78
commit d99af18cf1

View File

@@ -103,6 +103,7 @@ UIAddPolicies
... ELSE ProxyEnabled ${PolicyEnabled}
Run Keyword If "${PolicyType}"=="Security Policy" Security-Policies-OK
... ELSE Proxy-Policies-OK
Wait Until Element Is Enabled id=app_create
Security-Source Name ${PolicyName}
Run Keyword If "${PolicyType}"=="Security Policy" SecurityAssert ${PolicyName}
... ELSE ProxyAssert ${PolicyName}
@@ -492,7 +493,7 @@ Create-name
[Documentation] 输入name
sleep ${sleep}
run keyword if "${PolicyType}"=="Security Policy" run keywords sleep ${sleep}
... AND input text id=interceptionadd_name ${Name}
... AND input text xpath=//*[@id="policy_paper_left"]/div[2]/label[contains(text(), "Name")]/following-sibling::div/div/input ${Name}
run keyword if "${PolicyType}"=="Proxy Policy" run keywords sleep ${sleep}
... AND input text id=manipulation_elInput_policyName ${Name}
Create-actions
@@ -581,12 +582,17 @@ SecurityApplicationSearch
sleep ${sleep}
click element xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[5]/div[2]/div[2]/div/div[3]/div/div/ul/li[1]
sleep ${sleep}
${style}= Get Element Attribute class=el-message-box__wrapper style
log ${style}1111111111111
${c} Evaluate "display: none" in """${style}"""
run keyword if "${c}"=="False" click element xpath=/html/body/div/div/div[3]/button[2]
run keyword if "${c}"=="True" log go on
sleep ${sleep}
${status} Run Keyword And Return Status Page Should Contain Element xpath=/html/body/div/div/div[3]/button[2]
log ${status}
run keyword if "${status}" == "True" run keywords click element xpath=/html/body/div/div/div[3]/button[2]
... AND sleep ${sleep}
... ELSE log 未检测弹出框不操作
# ${style}= Get Element Attribute class=el-message-box__wrapper style
# log ${style}1111111111111
# ${c} Evaluate "display: none" in """${style}"""
# run keyword if "${c}"=="False" click element xpath=/html/body/div/div/div[3]/button[2]
# run keyword if "${c}"=="True" log go on
# sleep ${sleep}
click element id=check_list_allcancelobject
sleep ${sleep}
@@ -700,7 +706,7 @@ Create-SecurityFilter-judge
... ${Filter}:是一个列表列表中填入filter类型例如Host或URL等
... name:各个对象名称的列表
... 判断filter是否可以点击
${class}= Get Element Attribute xpath=/html/body/div[1]/div/div[3]/div[2]/div/div[1]/form/div/div[8]/div[1]/div/div[1] class
${class}= Get Element Attribute id=interceptionadd_add_filter class
run keyword if "${class}"=="addobject addobject-long-list obj-content-null filter-width-style cursor addobject-long-list-disabled" log filter不可点击不可添加filter
run keyword if "${class}"=="addobject addobject-long-list obj-content-null filter-width-style cursor" run keywords sleep ${sleep}
... AND Create-SecurityFilter ${Application} ${Filter} ${Hostname} ${URLname} ${Request Headername} ${Response Headername} ${Request Contentname}