1.更改administration关键子文件名称和路径
This commit is contained in:
0
01-TestCase/tsg_ui/Administration/RolesCase.robot
Normal file
0
01-TestCase/tsg_ui/Administration/RolesCase.robot
Normal file
@@ -1,26 +1,26 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui Users
|
||||
Resource ../../../02-Keyword/tsg_ui/users/User.robot
|
||||
Resource ../../../02-Keyword/tsg_ui/administration/Administration.robot
|
||||
Library OperatingSystem
|
||||
|
||||
*** Test Cases ***
|
||||
UsersCreate
|
||||
[Tags] Positive UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 0000 ${a} 111111 log 30 log superuser
|
||||
UserCreatePage 0000 ${a} 111111 log 30 log superuser
|
||||
#验证新建是否成功
|
||||
UserSearchName ${a} UserName
|
||||
${UserName} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[3]/div/div
|
||||
Should Be Equal As Strings ${UserName} ${a}
|
||||
sleep 1
|
||||
login ${a} 111111
|
||||
Login ${a} 111111
|
||||
${text1} get text xpath=//*[@id="children0"]/div/span
|
||||
Should Be Equal As Strings ${text1} Dashboard
|
||||
|
||||
UsersCreateOpenRequiredPasswordChange
|
||||
[Tags] Positive UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 0000 ${a} 111111 open 30 log superuser
|
||||
UserCreatePage 0000 ${a} 111111 open 30 log superuser
|
||||
UserSearchName ${a} UserName
|
||||
${UserName} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[3]/div/div
|
||||
Should Be Equal As Strings ${UserName} ${a}
|
||||
@@ -28,7 +28,7 @@ UsersCreateOpenRequiredPasswordChange
|
||||
UsersCreateCloseEnableButton
|
||||
[Tags] Positive UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 0000 ${a} 111111 open 30 close superuser
|
||||
UserCreatePage 0000 ${a} 111111 open 30 close superuser
|
||||
UserSearchName 0000 Name
|
||||
sleep 1
|
||||
${text} Get Element Attribute xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[10]/div/div/span/div class
|
||||
@@ -37,7 +37,7 @@ UsersCreateCloseEnableButton
|
||||
UsersCreateRoleSuperReader
|
||||
[Tags] Positive UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 0000 ${a} 111111 open 30 close superreader
|
||||
UserCreatePage 0000 ${a} 111111 open 30 close superreader
|
||||
UserSearchName 0000 Name
|
||||
sleep 1
|
||||
${text} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[5]/div/div
|
||||
@@ -46,7 +46,7 @@ UsersCreateRoleSuperReader
|
||||
UsersCloseEnableButton
|
||||
[Tags] Positive UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 0000 ${a} 111111 log 30 log superuser
|
||||
UserCreatePage 0000 ${a} 111111 log 30 log superuser
|
||||
UserSearchName ${a} UserName
|
||||
sleep 1
|
||||
Click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[10]/div/div/span/div
|
||||
@@ -57,7 +57,7 @@ UsersCloseEnableButton
|
||||
UsersEdit
|
||||
[Tags] Positive UI Administration Users
|
||||
${a} evaluate random.randint(10000,99990) random
|
||||
CreatePage UsersEdit ${a} 111111 log 30 log superuser
|
||||
UserCreatePage UsersEdit ${a} 111111 log 30 log superuser
|
||||
UserSearchName UsersEdit Name
|
||||
UserEdit 1111 close
|
||||
UserSearchName ${a} UserName
|
||||
@@ -78,7 +78,7 @@ UserSwitchDisplayNumber
|
||||
UsersCreateNameMinSize
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 1 ${a} 111111 log 30 log superuser
|
||||
UserCreatePage 1 ${a} 111111 log 30 log superuser
|
||||
UserSearchName 1 Name
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[4]/div/div
|
||||
Should Be Equal As Strings ${name} 1
|
||||
@@ -86,7 +86,7 @@ UsersCreateNameMinSize
|
||||
UsersCreateNameMaxSize
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage UsersCreateNameMaxSizeUsersCreat ${a} 111111 log 30 log superuser
|
||||
UserCreatePage UsersCreateNameMaxSizeUsersCreat ${a} 111111 log 30 log superuser
|
||||
UserSearchName UsersCreateNameMaxSizeUsersCreat Name
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[4]/div/div
|
||||
Should Be Equal As Strings ${name} UsersCreateNameMaxSizeUsersCreat
|
||||
@@ -94,7 +94,7 @@ UsersCreateNameMaxSize
|
||||
UsersCreateNameSpecialChar
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 中文+absc+моряков+@#¥%……&* ${a} 111111 log 30 log superuser
|
||||
UserCreatePage 中文+absc+моряков+@#¥%……&* ${a} 111111 log 30 log superuser
|
||||
UserSearchName 中文+absc+моряков+@#¥%……&* Name
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[4]/div/div
|
||||
Should Be Equal As Strings ${name} 中文+absc+моряков+@#¥%……&*
|
||||
@@ -102,7 +102,7 @@ UsersCreateNameSpecialChar
|
||||
UsersCreatePasswordExpirationMinimum
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 0000 ${a} 111111 open 1 log superuser
|
||||
UserCreatePage 0000 ${a} 111111 open 1 log superuser
|
||||
UserSearchName 0000 Name
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[4]/div/div
|
||||
Should Be Equal As Strings ${name} 0000
|
||||
@@ -110,7 +110,7 @@ UsersCreatePasswordExpirationMinimum
|
||||
UsersCreatePasswordExpirationMax
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 0000 ${a} 111111 open 2147483647 log superuser
|
||||
UserCreatePage 0000 ${a} 111111 open 2147483647 log superuser
|
||||
UserSearchName 0000 Name
|
||||
${name} get text xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[4]/div/div
|
||||
Should Be Equal As Strings ${name} 0000
|
||||
@@ -118,7 +118,7 @@ UsersCreatePasswordExpirationMax
|
||||
UsersCreateUserNameRepeat
|
||||
[Tags] Boundary UI Administration Users
|
||||
Menu administration Accounts
|
||||
CreatePage UsersCreateUserNameRepeat byb 111111 log 30 log superuser
|
||||
UserCreatePage UsersCreateUserNameRepeat byb 111111 log 30 log superuser
|
||||
sleep 1
|
||||
${text} get text xpath=/html/body/div[last()]/p
|
||||
Should Be Equal As Strings ${text} User already exists
|
||||
@@ -126,7 +126,7 @@ UsersCreateUserNameRepeat
|
||||
UsersCreatePasswordFormatError
|
||||
[Tags] Boundary UI Administration Users
|
||||
Menu administration Accounts
|
||||
CreatePage UsersCreateUserNameRepeat byb @#¥%……&*(*-++ log 30 log superuser
|
||||
UserCreatePage UsersCreateUserNameRepeat byb @#¥%……&*(*-++ log 30 log superuser
|
||||
sleep 1
|
||||
${text1} get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[3]/div/div[2]
|
||||
${text2} get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[4]/div/div[2]
|
||||
@@ -151,14 +151,14 @@ UsersCreatePasswordDifferent
|
||||
UsersCreatePasswordExpirationFormatError
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 0000 ${a} 111111 open 2147483648 log superuser
|
||||
UserCreatePage 0000 ${a} 111111 open 2147483648 log superuser
|
||||
${text} get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[6]/div/div[2]
|
||||
Should Be Equal As Strings ${text} Cannot be 0, exceed maximum 2147483647, and be empty
|
||||
|
||||
UsersCreatePasswordExpirationIs0
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 0000 ${a} 111111 open 0 log superuser
|
||||
UserCreatePage 0000 ${a} 111111 open 0 log superuser
|
||||
${text} get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[6]/div/div[2]
|
||||
Should Be Equal As Strings ${text} Cannot be 0, exceed maximum 2147483647, and be empty
|
||||
|
||||
@@ -5,71 +5,28 @@ Library Collections
|
||||
Library ../../../04-CustomLibrary/Custometest/StringManipulation.py
|
||||
|
||||
*** Keywords ***
|
||||
|
||||
openbrower
|
||||
Open Browser http:192.168.40.120 chrome
|
||||
|
||||
CreateButton
|
||||
Wait Until Element Is Enabled id=userAdd
|
||||
sleep 1
|
||||
Click element id=userAdd
|
||||
|
||||
Create-Name
|
||||
[Arguments] ${accName}
|
||||
Pages
|
||||
[Arguments]
|
||||
Menu administartion Accounts
|
||||
sleep 2
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/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[2]/div/div/div[1]/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[2]/div/div/div[1]/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[2]/div/div/div[1]/div[2]/form/div[6]/div/div
|
||||
... AND sleep 1
|
||||
... ELSE log 不操作
|
||||
|
||||
Create-Ok
|
||||
sleep 1
|
||||
click button xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/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]
|
||||
|
||||
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]
|
||||
|
||||
CreatePage
|
||||
|
||||
UserCreatePage
|
||||
[Arguments] ${name} ${username} ${accPasswd} ${Required_Password_Change} ${day} ${accEnable} ${role}
|
||||
Menu administration Accounts
|
||||
CreateButton
|
||||
Create-Name ${name}
|
||||
Create-Username ${username}
|
||||
Create-Password ${accPasswd}
|
||||
Wait Until Element Is Enabled id=userAdd 10
|
||||
Click element id=userAdd
|
||||
sleep 2
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[1]/div/div[1]/input ${name}
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[2]/div/div[1]/input ${username}
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[3]/div/div/input ${accPasswd}
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[4]/div/div/input ${accPasswd}
|
||||
sleep 1
|
||||
Create-Enable ${accEnable}
|
||||
run keyword if "${accEnable}"=="close" run keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[6]/div/div
|
||||
... AND sleep 1
|
||||
... ELSE log 不操作
|
||||
sleep 1
|
||||
run keyword if "${Required_Password_Change}"=="open" Run Keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[5]/div/div
|
||||
... AND sleep 1
|
||||
@@ -78,20 +35,23 @@ CreatePage
|
||||
Click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[last()]/div/div/div/span/span/i
|
||||
sleep 1
|
||||
click element //span[.="${role}"]
|
||||
Create-Ok
|
||||
sleep 1
|
||||
click button xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1]
|
||||
sleep 1
|
||||
UserEdit
|
||||
[Arguments] ${password} ${enable}
|
||||
Sleep 2
|
||||
click element id=userEdit
|
||||
Sleep 1
|
||||
Create-Password ${password}
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[3]/div/div/input ${password}
|
||||
sleep 1
|
||||
input text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[4]/div/div/input ${password}
|
||||
Sleep 1
|
||||
run keyword if "${enable}"=="close" run keywords click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[6]/div/div
|
||||
... AND sleep 1
|
||||
... ELSE log 不操作
|
||||
Create-Ok
|
||||
sleep 1
|
||||
click button xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1]
|
||||
sleep 2
|
||||
|
||||
UserSearchName
|
||||
@@ -112,7 +72,7 @@ UserSearchName
|
||||
click element xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]
|
||||
sleep 2
|
||||
|
||||
login
|
||||
Login
|
||||
[Arguments] ${UserName} ${Password}
|
||||
Mouse Hover xpath=//*[@id="app"]/div/div[1]/div[2]/div/span/div/span
|
||||
sleep 1
|
||||
@@ -125,29 +85,6 @@ login
|
||||
click element xpath=/html/body/div/div/div[2]/div/div[4]/button
|
||||
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
|
||||
|
||||
TurnPage
|
||||
[Arguments] ${NextPage} ${PreviousPage} ${JumpInput} ${pages} ${AssertXpath}
|
||||
[Documentation]
|
||||
@@ -205,17 +142,6 @@ PagingDisplay
|
||||
sleep 1
|
||||
${text} Get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[4]/div/ul/li[last()]
|
||||
Should Be Equal As Strings ${text} ${Page}
|
||||
|
||||
DeletePage
|
||||
[Arguments] ${name}
|
||||
sleep 1
|
||||
DeleteButton 1
|
||||
Delete-Delete
|
||||
|
||||
Pages
|
||||
[Arguments]
|
||||
Menu administartion Accounts
|
||||
sleep 3
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user