提交孙姜月ui-administrator代码,其中create-user-001和create-001两个case存在定位问题。
This commit is contained in:
86
02-Keyword/tsg_ui/accounts/Accounts.robot
Normal file
86
02-Keyword/tsg_ui/accounts/Accounts.robot
Normal file
@@ -0,0 +1,86 @@
|
||||
*** Settings ***
|
||||
Library Selenium2Library
|
||||
|
||||
*** Keywords ***
|
||||
openbrower
|
||||
Open Browser http:192.168.40.120 chrome
|
||||
|
||||
CreateButton
|
||||
Wait Until Element Is Enabled id=userAdd
|
||||
sleep 3
|
||||
Click element id=userAdd
|
||||
|
||||
Create-Name
|
||||
[Arguments] ${accName}
|
||||
sleep 2
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[1]/div/div[1]/input ${accName}
|
||||
|
||||
Create-Username
|
||||
[Arguments] ${accName}
|
||||
sleep 2
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[2]/div/div[1]/input ${accName}
|
||||
|
||||
Create-Password
|
||||
[Arguments] ${accPasswd}
|
||||
sleep 2
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[3]/div/div/input ${accPasswd}
|
||||
|
||||
Create-Ok
|
||||
sleep 1
|
||||
click button xpath=//*[@id="app"]/div/div[3]/div/div/div/div[2]/form/div[6]/div/div/button[1]
|
||||
|
||||
Create-Cancel
|
||||
click button id=userAdd_cancel
|
||||
|
||||
SelectOne
|
||||
sleep 3
|
||||
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
|
||||
|
||||
DeleteButton
|
||||
click button id=userDel
|
||||
|
||||
Delete-Delete
|
||||
sleep 2
|
||||
click button xpath=/html/body/div/div/div[3]/button[2]
|
||||
|
||||
Delete-Cancel
|
||||
click button xpath=/html/body/div[2]/div/div[3]/button[1]
|
||||
|
||||
User-Delete
|
||||
sleep 1
|
||||
click element id=userDel #点击删除按钮
|
||||
sleep 1
|
||||
click element xpath=/html/body/div/div/div[3]/button[2]
|
||||
|
||||
|
||||
User-Edit
|
||||
[Arguments] ${name}
|
||||
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
|
||||
|
||||
Ui-User-Search-Name
|
||||
[Arguments] ${name}
|
||||
Wait Until Page Contains Element id=one-input 10
|
||||
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
|
||||
Sleep 2
|
||||
|
||||
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
|
||||
sleep 1
|
||||
click element id=login
|
||||
sleep 2
|
||||
57
02-Keyword/tsg_ui/accounts/Accountspages.robot
Normal file
57
02-Keyword/tsg_ui/accounts/Accountspages.robot
Normal file
@@ -0,0 +1,57 @@
|
||||
*** Settings ***
|
||||
Library Selenium2Library
|
||||
Resource Accounts.robot
|
||||
Resource ../Menu.robot
|
||||
Library Collections
|
||||
|
||||
*** Keywords ***
|
||||
CreatePage
|
||||
[Arguments] ${name} ${username} ${accPasswd}
|
||||
Menu administartion Accounts
|
||||
sleep 3
|
||||
Accounts.CreateButton
|
||||
Accounts.Create-Name ${name}
|
||||
Accounts.Create-Username ${username}
|
||||
Accounts.Create-Password ${accPasswd}
|
||||
Accounts.Create-Ok
|
||||
|
||||
DeletePage
|
||||
[Arguments] ${name}
|
||||
sleep 1
|
||||
click element id=clear_input_btm
|
||||
sleep 1
|
||||
input text id=one-input ${name}
|
||||
press keys id=one-input ENTER
|
||||
Accounts.SelectOne
|
||||
Accounts.DeleteButton 1
|
||||
Accounts.Delete-Delete
|
||||
|
||||
CreatePage-null
|
||||
[Arguments] ${name} ${username} ${accPasswd}
|
||||
Menu administartion Accounts
|
||||
sleep 3
|
||||
Accounts.CreateButton
|
||||
Accounts.Create-Name ${name}
|
||||
Accounts.Create-Username ${username}
|
||||
Accounts.Create-Password ${accPasswd}
|
||||
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]
|
||||
... ELSE IF log "name值为空,不可以新建成功"
|
||||
|
||||
|
||||
CreatePage-User-Name-null
|
||||
[Arguments] ${name} ${username} ${accPasswd}
|
||||
Menu administartion Accounts
|
||||
sleep 3
|
||||
Accounts.CreateButton
|
||||
Accounts.Create-Name ${name}
|
||||
Accounts.Create-Username ${username}
|
||||
Accounts.Create-Password ${accPasswd}
|
||||
Accounts.Create-Ok
|
||||
sleep 2
|
||||
${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值为空,不可以新建成功"
|
||||
|
||||
Reference in New Issue
Block a user