提交IP Libraries关键字以及部分用例和Administration模块新增用了和修改优化关键字

This commit is contained in:
lyf
2020-07-20 18:38:17 +08:00
parent 08b00ebebd
commit cd1fb78c2c
12 changed files with 423 additions and 95 deletions

View File

@@ -45,7 +45,7 @@ Create-Hijack Files
click ${type} #选择文件类型
sleep 2
click id=hijackAddOk1 #点击OK
Sleep 2
Wait Until Element Is Visible id=one-input
input id=one-input ${name} #搜索输入框输入name
Sleep 1
click id=select_new_search_btn #点击搜索按钮
@@ -1147,3 +1147,132 @@ Req_Res_Body
\ ... AND click xpath=/html/body/div/div[1]/div[1]/ul/li[2]
\ ... AND sleep 1
\ ... AND input xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[1]/div[1]/form/div[10]/div[1]/div/div[2]/input ${dict}[${key}]
Create_Ip_Libraries
[Arguments] ${type} ${Continent/Country} ${GeoNameID} ${City} ${ip} ${j}=1 ${Country}=null ${Longitude}=null ${Latitude}=null
Sleep 1
click id=children5 #点击一级目录Settings
Sleep 1
click id=sidebarIP_Libraries #点击二级目录IP_Libraries
Sleep 2
click id=tagAdd #点击Create按钮
sleep 2
run keyword if "${type}"=="Country" Run Keywords click id=security_action_country
... AND sleep 1
... AND click id=ip_geography_continent
... AND sleep 1
... AND Switch_Geographic_Locations ${Continent/Country}
... AND input id=ip_geography_Country1 ${Country}
run keyword if "${type}"=="City" Run Keywords click id=security_action_city
... AND sleep 1
... AND click id=ip_geography_continent
... AND sleep 1
... AND Switch_Geographic_Locations ${Continent/Country}
sleep 1
input id=ip_geography_name ${GeoNameID}
sleep 1
input id=ip_geography_City ${City}
sleep 1
click id=ip_geography_IPRange
sleep 1
input id=ip_input0 ${ip}[0]
sleep 1
run keyword if "${j}"!="1" Ip_Range_Create ${j} ${ip}
run keyword if "${Longitude}"!="null" Run Keywords input id=ip_geography_longitude ${Longitude}
... AND sleep 1
run keyword if "${Latitude}"!="null" Run Keywords input id=ip_geography_latitude ${Latitude}
... AND sleep 1
click id=IP_library_add
sleep 2
#验证新建是否成功
Switch_GeoName ${GeoNameID}
${GeoNameText} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 2
Should Be Equal As Strings ${GeoNameText} ${GeoNameID} #断言
Switch_Geographic_Locations
[Arguments] ${Continent/Country}
sleep 1
input id=objectName_seach ${Continent/Country}
sleep 1
press keys id=objectName_seach ENTER
sleep 2
click xpath=//*[@id="right_locationList"]/div[2]/div[1]/div[2]/div/div
sleep 1
click id=interceptionadd_allcancelobject
sleep 1
Ip_Range_Create
[Arguments] ${j} ${ip}
sleep 1
: FOR ${i} IN RANGE 1 ${j}
\ sleep 1
\ click id=addIPList
\ sleep 1
\ input id=ip_input${i} ${ip}[${i}]
\ sleep 1
sleep 1
Switch_GeoName
[Arguments] ${GeoName}
sleep 2
input id=one-input ${GeoName}
sleep 1
click id=select_new_search_btn
sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 1
Delete_IP_Libraries
sleep 2
click id=tagDel
sleep 2
click xpath=/html/body/div/div/div[3]/button[2]
sleep 2
Switch_GeoName1
[Arguments] ${GeoName}
sleep 2
click id=one-input
sleep 1
click id=input_list_li1
sleep 1
input id=sreach_input ${GeoName}
sleep 1
click id=select_new_search_btn
sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 1
${GeoNameText} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 2
Should Be Equal As Strings ${GeoNameText} ${GeoName} #断言
Switch_Country
[Arguments] ${Country}
sleep 2
click id=one-input
sleep 1
click id=input_list_li2
sleep 1
input id=sreach_input ${Country}
sleep 1
click id=select_new_search_btn
sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 1
${CountryText} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[3]/div/div/div
sleep 2
Should Match ${CountryText} ${Country} #断言
Switch_City
[Arguments] ${City}
sleep 2
click id=one-input
sleep 1
click id=input_list_li3
sleep 1
input id=sreach_input ${City}
sleep 1
click id=select_new_search_btn
sleep 1
click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[1]/div/div/div
sleep 1
${CCityText} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[4]/div/div/div
sleep 2
Should Match ${CityText} ${City} #断言