diff --git a/01-TestCase/tsg_ui/ui_accounts/Accountscase.robot b/01-TestCase/tsg_ui/ui_accounts/Accountscase.robot index b5a7952..b536b49 100644 --- a/01-TestCase/tsg_ui/ui_accounts/Accountscase.robot +++ b/01-TestCase/tsg_ui/ui_accounts/Accountscase.robot @@ -7,7 +7,7 @@ Resource ../../../02-Keyword/tsg_ui/accounts/Accounts.robot *** Test Cases *** create-user-001 #新建Accounts - CreatePage 0000 ssjjyy 111111 + CreatePage 0000 ssjjyy 111111 log #验证新建是否成功 Ui-User-Search-Name 0000 ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span @@ -23,12 +23,12 @@ create-user-002 create-user-003 #新建Accounts - CreatePage 111111111111111111111111111111111 ${EMPTY} ${EMPTY} + CreatePage 111111111111111111111111111111111 ${EMPTY} ${EMPTY} log create-user-004 #新建Accounts - CreatePage xiaohong kkkkkk aaaa + CreatePage xiaohong kkkkkk aaaa log #验证新建是否成功 Ui-User-Search-Name xiaohong ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span @@ -39,7 +39,7 @@ create-user-004 create-user-005 #新建Accounts - CreatePage 小红 小红 a1@й + CreatePage 小红 小红 a1@й log #验证新建是否成功 Ui-User-Search-Name 小红 ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span @@ -50,7 +50,7 @@ create-user-005 create-user-006 #新建Accounts - CreatePage малый малый малый + CreatePage малый малый малый log #验证新建是否成功 Ui-User-Search-Name малый ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span @@ -61,14 +61,14 @@ create-user-006 edit-user-007 #新建Accounts - CreatePage 修改 edit 111111 + CreatePage 修改 edit 111111 log #验证新建是否成功 Ui-User-Search-Name 修改 ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span log ${name} Should Be Equal As Strings ${name} 修改 #修改对象 - User-Edit edit-1 + User-Edit edit-1 111111 log #查询修改对象 Ui-User-Search-Name edit-1 #删除对象 @@ -76,7 +76,7 @@ edit-user-007 create-user-008 #新建Accounts - CreatePage @#!&* *^%$ *^%$ + CreatePage @#!&* *^%$ *^%$ log #验证新建是否成功 Ui-User-Search-Name @#!&* ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span @@ -84,3 +84,63 @@ create-user-008 Should Be Equal As Strings ${name} @#!&* #删除对象 User-Delete + +edit-user-009 + #新建Accounts + CreatePage 修改 edit 111111 log + #验证新建是否成功 + Ui-User-Search-Name 修改 + ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span + log ${name} + Should Be Equal As Strings ${name} 修改 + #修改对象 + User-Edit 要修改了啊 !@#¥123lyfый close + #查询修改对象 + Ui-User-Search-Name 要修改了啊 + #删除对象 + User-Delete + +create-user-010 + #新建Accounts + CreatePage @#!&* *^%$ *^%$ log + #验证新建是否成功 + Ui-User-Search-Username * + ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span + #log ${name} + #Should Be Equal As Strings ${name} * + #删除对象 + #User-Delete + +create-user-011 + #新建Accounts + CreatePage @#!&* *^%$ *^%$ log + #验证新建是否成功 + Ui-User-Search-Name @ + ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span + #log ${name} + #Should Be Equal As Strings ${name} @ + #删除对象 + #User-Delete + +delete-user-012 + #新建Accounts + CreatePage @#!&* *^%$ *^%$ log + #验证新建是否成功 + Ui-User-Search-Name @#!&* + ${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[4]/div/div/span/span + log ${name} + Should Be Equal As Strings ${name} @#!&* + #删除对象 + User-Delete + +user-013 + + Pages + Ui-Pages 5 + #${count} Get Matching Xpath Count xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/span[2]/div/input #获取列表数据量 + #log ${count} + +create-user-014 + #新建Accounts + Ui-Button log + diff --git a/01-TestCase/tsg_ui/ui_audit/Auditcase.robot b/01-TestCase/tsg_ui/ui_audit/Auditcase.robot index 39c84ff..9a88b6c 100644 --- a/01-TestCase/tsg_ui/ui_audit/Auditcase.robot +++ b/01-TestCase/tsg_ui/ui_audit/Auditcase.robot @@ -21,23 +21,26 @@ search-user-003 #打开界面 Ui-login #查找 - Ui-User-Search-Operator sunjiangyue + Ui-User-Search-Operator sunjiangyue search-user-004 #打开界面 Ui-login #查找 - Ui-User-Search-Operator @*%& + Ui-User-Search-Operator @*%& search-user-005 #打开界面 Ui-login #查找 - Ui-User-Search-Operator a1@й + Ui-User-Search-Operator a1@й search-user-006 #打开界面 Ui-login #查找 - Ui-User-Search-Operator малый - \ No newline at end of file + Ui-User-Search-Operator малый + +user-007 + Pages + Ui-Pages 5 \ No newline at end of file diff --git a/01-TestCase/tsg_ui/ui_ldap/Ldapcase.robot b/01-TestCase/tsg_ui/ui_ldap/Ldapcase.robot index 457c8d1..a909b7b 100644 --- a/01-TestCase/tsg_ui/ui_ldap/Ldapcase.robot +++ b/01-TestCase/tsg_ui/ui_ldap/Ldapcase.robot @@ -7,13 +7,13 @@ Resource ../../../02-Keyword/tsg_ui/ldap/Ldap.robot *** Test Cases *** create-user-001 #界面 - Ui-login + #Ui-login #新建 CreatePage test localhost 25 test ou=People,dc=bifang,dc=com uid 111111 create-user-002 #界面 - Ui-login + #Ui-login #新建 CreatePage lucy 192.168.40.204 389 cn=root,dc=bifang,dc=com ou=People,dc=bifang,dc=com uid 11221 diff --git a/01-TestCase/tsg_ui/ui_login/Logincase.robot b/01-TestCase/tsg_ui/ui_login/Logincase.robot index 60803e5..22b7779 100644 --- a/01-TestCase/tsg_ui/ui_login/Logincase.robot +++ b/01-TestCase/tsg_ui/ui_login/Logincase.robot @@ -10,6 +10,7 @@ search-user-001 Ui-login #查找 Ui-User-Search-Name + search-user-002 #打开界面 @@ -21,7 +22,7 @@ search-user-003 #打开界面 Ui-login #查找 - User-Search-Name sunjiangyue + User-Search-Name sunjiangyue search-user-004 #打开界面 @@ -39,4 +40,8 @@ search-user-006 #打开界面 Ui-login #查找 - User-Search-Name малый \ No newline at end of file + User-Search-Name малый + +user-007 + Pages + Ui-Pages 5 \ No newline at end of file diff --git a/01-TestCase/tsg_ui/ui_mail/Mailcase.robot b/01-TestCase/tsg_ui/ui_mail/Mailcase.robot index 46b37c6..8316d1b 100644 --- a/01-TestCase/tsg_ui/ui_mail/Mailcase.robot +++ b/01-TestCase/tsg_ui/ui_mail/Mailcase.robot @@ -24,3 +24,13 @@ create-004 #新建 CreatePage 192.168.40.204 25 малый ttest@mail.test.com малый + +create-005 + + #新建 + CreatePage 0.0.0.0 0 t test@mail.test.com 1 + +create-006 + + #新建 + CreatePage 255.255.255.255 65535 tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt ttest@mail.test.com 111111111111111111111111111111111111111111111111111111111111233 \ No newline at end of file diff --git a/01-TestCase/tsg_ui/ui_settings/IP_Libraries_Case.robot b/01-TestCase/tsg_ui/ui_settings/IP_Libraries_Case.robot new file mode 100644 index 0000000..b6dfcc2 --- /dev/null +++ b/01-TestCase/tsg_ui/ui_settings/IP_Libraries_Case.robot @@ -0,0 +1,15 @@ +*** Settings *** +Force Tags tsg-ui settings IP Libraries +Resource ../../../03-Variable/bifangapivariable.txt +Resource ../../../02-Keyword/tsg_ui/setting/Settings.robot +Library OperatingSystem +*** Test Cases *** +IP_Libraries_Create_Country-001 + #ip段 + ${iplist} create list 10.1.1.1-20.1.1.1 20.1.1.1-30.1.1.1 + #新建国家 + Create_Ip_Libraries Country Africa 115 L ${iplist} j=2 Country=L Longitude=1 Latitude=2 + #删除 + Delete_IP_Libraries + + \ No newline at end of file diff --git a/01-TestCase/tsg_ui/ui_settings/Policy_Verify_Case.robot b/01-TestCase/tsg_ui/ui_settings/Policy_Verify_Case.robot new file mode 100644 index 0000000..376c891 --- /dev/null +++ b/01-TestCase/tsg_ui/ui_settings/Policy_Verify_Case.robot @@ -0,0 +1,9 @@ +*** Settings *** +Resource ../../../03-Variable/bifangapivariable.txt +Resource ../../../02-Keyword/Tsg_Ui/Setting/Settings.robot +Library OperatingSystem + +*** Test Cases *** +Policy_Verify-001 + ${dict} Create Dictionary Host=jd.com + Policy_Verify Security Policy Match Protocol-HTTP Client-IP1=192.168.50.30 dict1=${dict} diff --git a/02-Keyword/tsg_ui/accounts/Accounts.robot b/02-Keyword/tsg_ui/accounts/Accounts.robot index 184d934..b33cc3f 100644 --- a/02-Keyword/tsg_ui/accounts/Accounts.robot +++ b/02-Keyword/tsg_ui/accounts/Accounts.robot @@ -25,9 +25,16 @@ Create-Password sleep 2 input text xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[3]/div/div/input ${accPasswd} +Create-Enable + [Arguments] ${accEnable} + sleep 2 + run keyword if "${accEnable}"=="close" run keywords click element xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/div[2]/form/div[4]/div/div + ... AND sleep 1 + ... ELSE log 不操作 + Create-Ok sleep 1 - click button xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[6]/div/div/button[1] + click button xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/button[1] Create-Cancel click button id=userAdd_cancel @@ -54,18 +61,24 @@ User-Delete User-Edit - [Arguments] ${name} + [Arguments] ${name} ${password} ${enable} Sleep 2 click element id=userEdit Sleep 2 input text xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[1]/div/div[1]/input ${name} Sleep 1 - click element xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[6]/div/div/button[1] - Sleep 2 + input text xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/div[2]/form/div[3]/div/div/input ${password} + Sleep 1 + run keyword if "${enable}"=="close" run keywords click element xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/div[2]/form/div[4]/div/div + ... AND sleep 1 + ... ELSE log 不操作 + click element xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/button[1]/span + sleep 2 Ui-User-Search-Name [Arguments] ${name} - Wait Until Page Contains Element id=one-input 10 + sleep 2 + #Wait Until Page Contains Element id=one-input 10 click element id=one-input sleep 2 click element id=input_list_li2 @@ -75,7 +88,22 @@ Ui-User-Search-Name click element id=select_new_search_btn sleep 2 click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table - Sleep 2 + sleep 2 + +Ui-User-Search-Username + [Arguments] ${name} + sleep 2 + #Wait Until Page Contains Element id=one-input 10 + click element id=one-input + sleep 3 + click element id=input_list_li1 + sleep 2 + input text id=sreach_input ${name} + sleep 2 + click element id=select_new_search_btn + sleep 2 + click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table + sleep 2 login Input Text xpath=//*[@id="app"]/div/div[2]/div/div[2]/div/input sjy @@ -84,3 +112,26 @@ login sleep 1 click element id=login sleep 2 + +Ui-Pages + [Arguments] ${accpages} + click element xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/ul/li[1] + sleep 2 + click element xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/button[2]/i + sleep 2 + Clear Element Text xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/span[2]/div/input + sleep 2 + input text xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/span[2]/div/input ${accpages} + sleep 2 + press keys xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/span[2]/div/input ENTER + sleep 2 + +Ui-Button + [Arguments] ${accEnable} + Menu administartion Accounts + sleep 2 + click element id=userAdd + sleep 2 + run keyword if "${accEnable}"=="close" run keywords click element xpath=//*[@id="app"]/div/div[3]/div/div/div[1]/div[2]/form/div[4]/div/div + ... AND sleep 1 + ... ELSE log success \ No newline at end of file diff --git a/02-Keyword/tsg_ui/accounts/Accountspages.robot b/02-Keyword/tsg_ui/accounts/Accountspages.robot index 529e52b..e0a3b6b 100644 --- a/02-Keyword/tsg_ui/accounts/Accountspages.robot +++ b/02-Keyword/tsg_ui/accounts/Accountspages.robot @@ -6,13 +6,14 @@ Library Collections *** Keywords *** CreatePage - [Arguments] ${name} ${username} ${accPasswd} + [Arguments] ${name} ${username} ${accPasswd} ${accEnable} Menu administartion Accounts sleep 3 Accounts.CreateButton Accounts.Create-Name ${name} Accounts.Create-Username ${username} Accounts.Create-Password ${accPasswd} + Accounts.Create-Enable ${accEnable} Accounts.Create-Ok DeletePage @@ -37,9 +38,9 @@ CreatePage-null Accounts.Create-Ok sleep 2 ${text} get text xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[1]/div/div[3] - run keyword if "${text}"=="Name field is required." click element xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[6]/div/div/button[2] + run keyword if "${text}"=="Name field is required." click element xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/button[2] ... ELSE IF log "name值为空,不可以新建成功" - + CreatePage-User-Name-null [Arguments] ${name} ${username} ${accPasswd} @@ -54,4 +55,11 @@ CreatePage-User-Name-null ${text} get text xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[2]/div/div[3] run keyword if "${text}"=="Account field is required." click element xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[6]/div/div/button[2] ... ELSE IF log "name值为空,不可以新建成功" - + +Pages + [Arguments] + Menu administartion Accounts + sleep 3 + + + diff --git a/02-Keyword/tsg_ui/audit/Audit.robot b/02-Keyword/tsg_ui/audit/Audit.robot index 146c031..c374653 100644 --- a/02-Keyword/tsg_ui/audit/Audit.robot +++ b/02-Keyword/tsg_ui/audit/Audit.robot @@ -4,6 +4,7 @@ Library Selenium2Library *** Keywords *** Ui-User-Search-Name + sleep 2 click element id=one-input sleep 2 click element id=input_list_li1 @@ -16,6 +17,7 @@ Ui-User-Search-Name sleep 2 Ui-User-Search + sleep 2 click element id=one-input sleep 2 click element id=input_list_li1 @@ -37,13 +39,29 @@ Ui-User-Search-Operator login Input Text xpath=//*[@id="app"]/div/div[2]/div/div[2]/div/input sjy sleep 1 - Input Text xpath=//*[@id="app"]/div/div[2]/div/div[3]/div/input 111111 + input text xpath=//*[@id="app"]/div/div[2]/div/div[3]/div/input 111111 sleep 1 click element id=login sleep 2 Ui-login - click element id=children6 - sleep 2 - click element id=sidebarsystem_PolicyConfigurationLog - sleep 2 + Menu administartion Audit Log + sleep 3 + +Ui-Pages + [Arguments] ${accpages} + click element xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/ul/li[1] + sleep 2 + click element xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/button[2]/i + sleep 2 + Clear Element Text xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/span[2]/div/input + sleep 2 + input text xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/span[2]/div/input ${accpages} + sleep 2 + press keys xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/span[2]/div/input ENTER + sleep 2 + +Pages + [Arguments] + Menu administartion Audit Log + sleep 3 \ No newline at end of file diff --git a/02-Keyword/tsg_ui/login/Login.robot b/02-Keyword/tsg_ui/login/Login.robot index 09ff0ea..9773c82 100644 --- a/02-Keyword/tsg_ui/login/Login.robot +++ b/02-Keyword/tsg_ui/login/Login.robot @@ -1,62 +1,82 @@ -*** Settings *** -Library Selenium2Library -Resource ../../../03-Variable/BifangApiVariable.txt -Library Selenium2Library -Resource ../objects/Objects.robot -Resource ../objects/ObjectPages.robot - -*** Keywords *** -Login - Open Browser http://${host}/#/login ${browserType} - Maximize Browser Window - input text xpath=//*[@id="app"]/div/div[2]/div/div[2]/div/input ${username} - input text xpath=//*[@id="app"]/div/div[2]/div/div[3]/div/input ${password} - Click button id=login - -AddLocalIp - ${obj1} create dictionary type=Ip name=LocahIPName ipads=${ipType} ipclient=masks ipclienttext1=${testClentIP} ipclienttext2=${ipMask} - CreatePage ${obj1}[type] ${obj1}[name] ipads=${obj1}[ipads] ipclient=${obj1}[ipclient] ipclienttext1=${obj1}[ipclienttext1] ipclienttext2=${obj1}[ipclienttext2] - set global variable ${LocahIPName} ${obj1}[name] - -UiLoginAndAddLocalIP - log UiLoginAndAddLocalIP - Login.Login - Run Keyword If ${addTestClentIPFlag}==1 AddLocalIp - log UiLoginAndAddLocalIP:${LocahIPName} - - -Ui-login - click element id=children6 - sleep 2 - click element id=sidebarsystem_LoginLog - sleep 2 -Ui-User-Search-Name - click element id=one-input - sleep 2 - click element id=input_list_li1 - sleep 2 - click element id=update_sreach0 - sleep 2 - click element id=OperatorInfo01 - sleep 2 - click element id=select_new_search_btn - sleep 2 - -Ui-User-Search - click element id=one-input - sleep 2 - click element id=input_list_li1 - sleep 2 - click element id=update_sreach0 - sleep 2 - click element id=OperatorInfo02 - sleep 2 - click element id=select_new_search_btn - sleep 2 - -User-Search-Name - [Arguments] ${name} - input text id=one-input ${name} - sleep 2 - click element id=select_new_search_btn - sleep 2 \ No newline at end of file +*** Settings *** +Library Selenium2Library +Resource ../../../03-Variable/BifangApiVariable.txt +Library Selenium2Library +Resource ../objects/Objects.robot +Resource ../objects/ObjectPages.robot + +*** Keywords *** +Login + Open Browser http://${host}/#/login ${browserType} + Maximize Browser Window + input text xpath=//*[@id="app"]/div/div[2]/div/div[2]/div/input ${username} + input text xpath=//*[@id="app"]/div/div[2]/div/div[3]/div/input ${password} + Click button id=login + +AddLocalIp + ${obj1} create dictionary type=Ip name=LocahIPName ipads=${ipType} ipclient=masks ipclienttext1=${testClentIP} ipclienttext2=${ipMask} + CreatePage ${obj1}[type] ${obj1}[name] ipads=${obj1}[ipads] ipclient=${obj1}[ipclient] ipclienttext1=${obj1}[ipclienttext1] ipclienttext2=${obj1}[ipclienttext2] + set global variable ${LocahIPName} ${obj1}[name] + +UiLoginAndAddLocalIP + log UiLoginAndAddLocalIP + Login.Login + Run Keyword If ${addTestClentIPFlag}==1 AddLocalIp + log UiLoginAndAddLocalIP:${LocahIPName} + +Ui-login + Menu administartion Login Log + sleep 3 + click element id=sidebarsystem_LoginLog + sleep 2 + +Ui-User-Search-Name + click element id=one-input + sleep 2 + click element id=input_list_li1 + sleep 2 + click element id=update_sreach0 + sleep 2 + click element id=OperatorInfo01 + sleep 2 + click element id=select_new_search_btn + sleep 2 + + +Ui-User-Search + click element id=one-input + sleep 2 + click element id=input_list_li1 + sleep 2 + click element id=update_sreach0 + sleep 2 + click element id=OperatorInfo02 + sleep 2 + click element id=select_new_search_btn + sleep 2 + +User-Search-Name + [Arguments] ${name} + input text id=one-input ${name} + sleep 2 + click element id=select_new_search_btn + sleep 2 + +Ui-Pages + [Arguments] ${accpages} + click element xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/ul/li[1] + sleep 2 + click element xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/button[2]/i + sleep 2 + Clear Element Text xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/span[2]/div/input + sleep 2 + input text xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/span[2]/div/input ${accpages} + sleep 2 + press keys xpath=//*[@id="app"]/div/div[3]/div/div/div[4]/div/span[2]/div/input ENTER + sleep 2 + +Pages + Menu administartion Login Log + sleep 3 + click element id=sidebarsystem_LoginLog + sleep 2 \ No newline at end of file diff --git a/02-Keyword/tsg_ui/setting/Settings.robot b/02-Keyword/tsg_ui/setting/Settings.robot index 6d39055..09f0beb 100644 --- a/02-Keyword/tsg_ui/setting/Settings.robot +++ b/02-Keyword/tsg_ui/setting/Settings.robot @@ -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} #断言 \ No newline at end of file