diff options
| author | dongxiaoyan <[email protected]> | 2021-06-15 19:37:46 +0800 |
|---|---|---|
| committer | dongxiaoyan <[email protected]> | 2021-06-15 19:37:46 +0800 |
| commit | 0847bdd64d47f18ca995a81d3560b4bae9b04e1b (patch) | |
| tree | 6def734f9ecb7fc2a97196f5e48839ae6c1dd0d6 /keyword/profiles/profiles.robot | |
| parent | 3c8341971455d3d1b0981607426cff9674496c0b (diff) | |
Diffstat (limited to 'keyword/profiles/profiles.robot')
| -rw-r--r-- | keyword/profiles/profiles.robot | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/keyword/profiles/profiles.robot b/keyword/profiles/profiles.robot new file mode 100644 index 0000000..3953d9f --- /dev/null +++ b/keyword/profiles/profiles.robot @@ -0,0 +1,69 @@ +*** Settings ***
+Library Selenium2Library
+Library Collections
+Resource ../../variable/common_variable.txt
+
+*** Keywords ***
+ResponsePage
+ [Arguments] ${createOrEdit} ${name} ${filePath}
+ [Documentation]
+ ... ${createOrEdit}: 传入 “Create” 或者 “Edit” 来判断新建或者修改
+ ... ${name}:新建页面name输入框里的内容
+ ... ${filePath}:上传文件所在本地的路径
+
+ Run Keyword If "${createOrEdit}" == "Create" Run Keywords sleep 1
+ ... AND click element id=children6 #点击一级目录Settings
+ ... AND sleep ${sleep}
+ ... AND click element id=sidebarProxy_Profiles #点击二级目录Proxy Profiles
+ ... AND Wait Until Element Is Enabled id=responseAdd ${sleep_Wait}
+ ... AND click element id=responseAdd
+ Run Keyword If "${createOrEdit}" == "Edit" Run keywords sleep 1
+ ... AND click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
+ ... AND sleep ${sleep}
+ ... AND click element id=resinseEdit
+ sleep ${sleep}
+ input text id=responsepages_profileName1 ${name} #输入name
+ Choose File xpath=//*[@id="policy_Manipulation_create6"]/div[2]/form/div/div/div/div/input ${filePath} #上传文件
+ sleep ${sleep}
+ click element id=responseAddOk1 #点击OK缇交
+ Wait Until Element Is Enabled id=responseAdd ${sleep_Wait}
+ Search ${name} name #搜索框的关键字
+ sleep ${sleep}
+ ${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}
+
+
+Search
+ [Arguments] ${value} ${search}
+ [Documentation]
+ ... ${value}:传入查询的数据
+ ... ${search}:传入搜索框查询的类型
+ sleep ${sleep}
+ click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div[1]/span/div/div/div[2]/div/div/div/input #点击搜索框
+ sleep ${sleep_min}
+ run keyword if "${search}"=="name" run keywords sleep ${sleep_min}
+ ... AND click element xpath=/html/body/div/div[1]/div[1]/ul/li[3]
+ ... AND input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div[1]/span/div/div/div[2]/div/div[1]/div[3]/div/input ${value}
+ sleep ${sleep}
+ click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[2]/div/div/div[1]/span/div/i #点击搜索按钮
+ sleep ${sleep}
+
+Delete
+ click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
+ sleep ${sleep}
+ click element id=resinseDel
+ sleep ${sleep}
+ click element xpath=/html/body/div/div/div[3]/button[2]
+ sleep ${sleep}
+
+
+
+
+
+
+
+
+
+
+
+
|
