From 864556c6873915b816b16635838468284479c73b Mon Sep 17 00:00:00 2001 From: liuyuanfang Date: Fri, 22 May 2020 21:27:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=B0=E5=A2=9ESettings?= =?UTF-8?q?=E5=85=B3=E9=94=AE=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 02-Keyword/tsg_ui/Setting/Settings.robot | 78 ++++++++++++++---------- 1 file changed, 45 insertions(+), 33 deletions(-) diff --git a/02-Keyword/tsg_ui/Setting/Settings.robot b/02-Keyword/tsg_ui/Setting/Settings.robot index 7874d91..7308fcf 100644 --- a/02-Keyword/tsg_ui/Setting/Settings.robot +++ b/02-Keyword/tsg_ui/Setting/Settings.robot @@ -21,7 +21,7 @@ ui-login click xpath=//*[@id="app"]/div/div[2]/div/div[4]/button Create-Hijack Files - [Arguments] ${name} ${file} ${type} + [Arguments] ${name} ${file} ${type} ${shift}=1 ${input1}=1 Sleep 1 click id=children5 #点击一级目录Settings Sleep 1 @@ -35,11 +35,17 @@ Create-Hijack Files Sleep 2 Choose File xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[2]/form/div[2]/div/div/div[1]/input ${file} #上传文件 Sleep 2 + ${dow_name} Set Variable ${shift} + ${input} Set Variable ${input1} + run keyword if "${dow_name}"=="close" and "${input}"=="shuru" run keywords sleep 1 + ... AND input id=hijack_contentName ${name} + ... ELSE IF "${dow_name}"=="open" click xpath=//*[@id="contentNameChoose"]/div[1]/span[2] + sleep 1 click id=hijackAddContentType #点击+ 打开侧滑窗口 Sleep 1 click ${type} #选择文件类型 sleep 2 - click id=hijackAddOk #点击OK + click id=hijackAddOk1 #点击OK Sleep 2 input id=one-input ${name} #搜索输入框输入name Sleep 1 @@ -75,7 +81,6 @@ Create-Insert Scripts Sleep 1 ${text1} Get Text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr[1]/td[2]/div/div/span #获取点击后页面文本信息 Should Be Equal As Strings ${text1} ${name} #断言 - ui-logout Create-Traffic Mirror Profiles [Arguments] ${name} ${type} ${shuru} @@ -104,7 +109,6 @@ Create-Traffic Mirror Profiles Sleep 1 ${text1} Get Text xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[2]/div/div[3]/table/tbody/tr/td[2]/div/div/span #获取点击后页面文本信息 Should Be Equal As Strings ${text1} ${name} #断言 - ui-logout Edit-Insert Scripts [Arguments] ${id-name} ${name} ${name1} ${file} ${type} @@ -115,11 +119,9 @@ Edit-Insert Scripts ... ${name1}:为修改页面的name输入框里输入的内容 ... ${file}:为修改页面要上传文件的路径 ... ${type}:选择文件类型的元素 - Sleep 1 - click xpath=//*[@id="app"]/div/div[2]/ul/li[6]/div #点击一级目录Settings - Sleep 1 + sleep 1 click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles - Sleep 2 + sleep 2 click id=profilesTabs_Profile_Insert #点击Insert files按钮 sleep 1 click id=one-input #搜索点击输入框 @@ -173,7 +175,6 @@ Create-Response Pages Sleep 1 ${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/span #获取点击后页面文本信息 Should Be Equal As Strings ${text1} ${name} #断言 - #ui-logout Edit-Response Pages [Arguments] ${id-name} ${name} ${name1} ${file} @@ -183,17 +184,15 @@ Edit-Response Pages ... ${name}:为查询输入框输入内容 ... ${name1}:为修改页面的name输入框里输入的内容 ... ${file}:为修改页面要上传文件的路径 - Sleep 1 - click xpath=//*[@id="app"]/div/div[2]/ul/li[6]/div #点击一级目录Settings - Sleep 1 + sleep 1 click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles Sleep 2 click id=one-input #搜索点击输入框 - sleep 1 + Sleep 1 click ${id-name} #选择ID或者name - sleep 1 + Sleep 1 input id=sreach_input ${name} - sleep 1 + Sleep 1 click xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1] #点击搜素到的列表 sleep 1 click id=resinseEdit #点击Edit @@ -207,7 +206,8 @@ Edit-Response Pages click xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div[7]/div/div/button[1] Edit-Hijack Files - [Arguments] ${id-name} ${name} ${name1} ${file} ${type} + [Arguments] ${id-name} ${name} ${name1} ${file} ${type} ${shift}=1 + ... ${input1}=1 [Documentation] 引用关键字,填入必填参数 ... 必填参数: ... ${id-name}:为选择要查询的类型是ID或者Name的元素 @@ -215,9 +215,7 @@ Edit-Hijack Files ... ${name1}:为修改页面的name输入框里输入的内容 ... ${file}:为修改页面要上传文件的路径 ... ${type}:为文件类型的元素 - Sleep 1 - click xpath=//*[@id="app"]/div/div[2]/ul/li[6]/div #点击一级目录Settings - Sleep 1 + sleep 1 click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles Sleep 2 click id=profilesTabs_Profile_HijackFiles #点击Hijack files按钮 @@ -240,6 +238,12 @@ Edit-Hijack Files sleep 1 Choose File xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div[1]/div[2]/form/div[5]/div/div/div[1]/input ${file} #上传文件 sleep 1 + ${dow_name} Set Variable ${shift} + ${input} Set Variable ${input1} + run keyword if "${dow_name}"=="close" and "${input}"=="shuru" run keywords sleep 1 + ... AND input id=hijack_contentName ${name} + ... ELSE IF "${dow_name}"=="open" click xpath=//*[@id="contentNameChoose"]/div[1]/span[2] + sleep 1 click id=hijackAddContentType #点击+号打开侧滑框 sleep 3 click ${type} #选择类型 @@ -257,9 +261,7 @@ Edit-Traffic Mirror Profiles ... ${name1}:为修改页面的name输入框里输入的内容 ... ${type}:为选择点击vlan或mac的元素 ... ${shuju}:为输入框输入内容 - Sleep 1 - click xpath=//*[@id="app"]/div/div[2]/ul/li[6]/div #点击一级目录Settings - Sleep 1 + sleep 1 click id=sidebarProxy_Profiles #点击二级目录Proxy Profiles Sleep 2 click id=profilesTabs_Profile_TrafficMirrorProfiles #点击Traffic Mirror Profiles按钮 @@ -317,10 +319,10 @@ import-Trusted Certificate Authorities Sleep 1 ${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span #获取点击后页面文本信息 Should Be Equal As Strings ${text1} ${name} #断言 - #ui-logout Create-Decryption Keyrings [Arguments] ${name} ${file} ${file1} ${1or2} ${type} ${type1} + ... ${shift}=close [Documentation] 引用次关键字,填入必填参数 ... 必填参数: ... ${name}:新建页面name输入框里的内容 @@ -357,6 +359,10 @@ Create-Decryption Keyrings sleep 1 click ${type1} #选择加密解密类型 sleep 1 + ${root} Set Variable ${shift} + run keyword if "${root}"=="open" run keywords sleep 1 + ... AND click xpath=//*[@id="app"]/div/div[3]/div/div/div[2]/div/div[2]/form/div[10]/div/div + ... ELSE IF "${root}"=="close" log "go on" click id=keyringsadd_sub #点击OK缇交 Sleep 1 input xpath=//*[@id="one-input"] ${name} #搜索框输入 @@ -365,7 +371,6 @@ Create-Decryption Keyrings Sleep 1 ${text1} Get Text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr/td[2]/div/div/div/p/span #获取点击后页面文本信息 Should Be Equal As Strings ${text1} ${name} #断言 - #ui-logout Create-SSL Decryption Exclusion [Arguments] ${name} ${value} ${name1} @@ -428,9 +433,7 @@ Edit-Trusted Certificate Authorities ... ${value}:为查询输入框输入内容 ... ${name}:为修改页面的name输入框里输入的内容 ... ${file}:为修改页面要上传文件的路径 - Sleep 1 - click id=children5 #点击一级目录Settings - Sleep 1 + sleep 1 click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities Sleep 2 click id=one-input #点击搜索框 @@ -466,9 +469,7 @@ Edit-Decryption Keyrings ... ${1or2}:填入1 或者其他 ... ${type}:上传证书类型的元素 ... ${type1}:上传证书加密解密算法的元素 - Sleep 1 - click id=children5 #点击一级目录Settings - Sleep 1 + sleep 1 click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities Sleep 2 click xpath=//*[@id="proxyTabs"]/div/ul/li[2] #点击Decryption Keyrings @@ -513,9 +514,7 @@ Edit-SSL Decryption Exclusion ... ${value}:输入搜索的内容 ... ${name}:输入name ... ${calue1}:输入内容 - Sleep 1 - click id=children5 #点击一级目录Settings - Sleep 1 + sleep 1 click id=sidebarProxy_CertificateManagement #点击二级目录Trusted Certificate Authorities Sleep 2 click xpath=//*[@id="proxyTabs"]/div/ul/li[3] #点击SSL Decryption Exclusion按钮 @@ -539,3 +538,16 @@ Edit-SSL Decryption Exclusion input id=sslAdd_itemDesc ${value1} #输入内容 Sleep 2 click id=ssl_ok #点击OK缇交 + +Settings_swarch_name + [Arguments] ${name} + sleep 2 + click element id=one-input + sleep 2 + click element id=input_list_li2 + 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