diff --git a/02-Keyword/tsg_ui/policy/UIPolicy.robot b/02-Keyword/tsg_ui/policy/UIPolicy.robot index 46d09f7..b195b97 100644 --- a/02-Keyword/tsg_ui/policy/UIPolicy.robot +++ b/02-Keyword/tsg_ui/policy/UIPolicy.robot @@ -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}