1.新增Case 2.修改关键字 3.新增python文件对字符串的操作 4.更改UserCase的文件位置
This commit is contained in:
180
01-TestCase/tsg_ui/Administration/Users.robot
Normal file
180
01-TestCase/tsg_ui/Administration/Users.robot
Normal file
@@ -0,0 +1,180 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui Users
|
||||
Resource ../../../02-Keyword/tsg_ui/accounts/Accountspages.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
|
||||
#验证新建是否成功
|
||||
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
|
||||
${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
|
||||
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}
|
||||
|
||||
UsersCreateCloseEnableButton
|
||||
[Tags] Positive UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 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
|
||||
Should Be Equal As Strings ${text} el-switch
|
||||
|
||||
UsersCreateRoleSuperReader
|
||||
[Tags] Positive UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 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
|
||||
Should Be Equal As Strings ${text} superreader
|
||||
|
||||
UsersCloseEnableButton
|
||||
[Tags] Positive UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 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
|
||||
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
|
||||
Should Be Equal As Strings ${text} el-switch
|
||||
|
||||
UsersEdit
|
||||
[Tags] Positive UI Administration Users
|
||||
${a} evaluate random.randint(10000,99990) random
|
||||
CreatePage UsersEdit ${a} 111111 log 30 log superuser
|
||||
UserSearchName UsersEdit Name
|
||||
UserEdit 1111 close
|
||||
UserSearchName ${a} UserName
|
||||
${text} Get Element Attribute xpath=//*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[10]/div/div/span/div class
|
||||
Should Be Equal As Strings ${text} el-switch
|
||||
|
||||
UserTurnPage
|
||||
[Tags] Positive UI Administration Users
|
||||
Menu administration Accounts
|
||||
TurnPage //*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[4]/div/button[2] //*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[4]/div/button[1]
|
||||
... //*[@id="app"]/div/div[3]/div[2]/div/div[3]/div/div/div[4]/div/span[2]/div/input 2 //*[@id="ly-table1-listcontent"]/div/div[3]/table/tbody/tr[1]/td[1]/div/div
|
||||
|
||||
UserSwitchDisplayNumber
|
||||
[Tags] Positive UI Administration Users
|
||||
Menu administration Accounts
|
||||
PagingDisplay 50
|
||||
|
||||
UsersCreateNameMinSize
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 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
|
||||
|
||||
UsersCreateNameMaxSize
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 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
|
||||
|
||||
UsersCreateNameSpecialChar
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 中文+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+моряков+@#¥%……&*
|
||||
|
||||
UsersCreatePasswordExpirationMinimum
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 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
|
||||
|
||||
UsersCreatePasswordExpirationMax
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 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
|
||||
|
||||
UsersCreateUserNameRepeat
|
||||
[Tags] Boundary UI Administration Users
|
||||
Menu administration Accounts
|
||||
CreatePage 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
|
||||
|
||||
UsersCreatePasswordFormatError
|
||||
[Tags] Boundary UI Administration Users
|
||||
Menu administration Accounts
|
||||
CreatePage 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]
|
||||
Should Be Equal As Strings ${text1} Only English letters, numbers, and special characters ~!@#$%^&*_.?
|
||||
Should Be Equal As Strings ${text2} Only English letters, numbers, and special characters ~!@#$%^&*_.?
|
||||
|
||||
UsersCreatePasswordDifferent
|
||||
[Tags] Boundary UI Administration Users
|
||||
Menu administration Accounts
|
||||
sleep 1
|
||||
Click element id=userAdd
|
||||
sleep 1
|
||||
Input Text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[3]/div/div/input 11
|
||||
sleep 1
|
||||
Input Text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[4]/div/div[1]/input 111
|
||||
sleep 1
|
||||
Accounts.Create-Ok
|
||||
sleep 1
|
||||
${text} get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[4]/div/div[2]
|
||||
Should Be Equal As Strings ${text} The two passwords are inconsistent
|
||||
|
||||
UsersCreatePasswordExpirationFormatError
|
||||
[Tags] Boundary UI Administration Users
|
||||
${a} evaluate random.randint(1000,9999) random
|
||||
CreatePage 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
|
||||
${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
|
||||
|
||||
UsersCreateNull
|
||||
[Tags] Boundary UI Administration Users
|
||||
Menu administration Accounts
|
||||
sleep 1
|
||||
Click element id=userAdd
|
||||
Wait Until Element Is Enabled xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1] 20
|
||||
click element xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[2]/button[1]
|
||||
sleep 1
|
||||
${text1} Get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[1]/div/div[3]
|
||||
${text2} Get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[2]/div/div[3]
|
||||
${text3} Get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[3]/div/div[2]
|
||||
${text4} Get text xpath=//*[@id="app"]/div/div[3]/div[2]/div/div/div[1]/div[2]/form/div[4]/div/div[2]
|
||||
Should Be Equal As Strings ${text1} Name field is required.
|
||||
Should Be Equal As Strings ${text2} Account field is required.
|
||||
Should Be Equal As Strings ${text3} This item is required
|
||||
Should Be Equal As Strings ${text4} This item is required
|
||||
@@ -1,146 +0,0 @@
|
||||
*** Settings ***
|
||||
Force Tags tsg-ui accounts
|
||||
Resource ../../../02-Keyword/tsg_ui/accounts/Accountspages.robot
|
||||
Library OperatingSystem
|
||||
Resource ../../../02-Keyword/tsg_ui/accounts/Accounts.robot
|
||||
|
||||
*** Test Cases ***
|
||||
create-user-001
|
||||
#新建Accounts
|
||||
CreatePage 0000 xxxx2 111111 log 30 log superuser
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name 0000 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} 0000
|
||||
#删除对象
|
||||
|
||||
|
||||
create-user-002
|
||||
#新建Accounts
|
||||
CreatePage-null ${EMPTY} ${EMPTY} ${EMPTY}
|
||||
|
||||
|
||||
create-user-003
|
||||
#新建Accounts
|
||||
CreatePage 111111111111111111111111111111111 ${EMPTY} ${EMPTY} log
|
||||
|
||||
|
||||
create-user-004
|
||||
#新建Accounts
|
||||
CreatePage xiaohong kkkkkk1 aaaa log superuser
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name xiaohong 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} xiaohong
|
||||
#删除对象
|
||||
|
||||
|
||||
create-user-005
|
||||
#新建Accounts
|
||||
CreatePage 小红 小红1 a1@й log superuser
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name 小红 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} 小红
|
||||
#删除对象
|
||||
|
||||
|
||||
create-user-006
|
||||
#新建Accounts
|
||||
CreatePage малый малый1 малый log superuser
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name малый 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} малый
|
||||
#删除对象
|
||||
|
||||
|
||||
edit-user-007
|
||||
#新建Accounts
|
||||
CreatePage 修改 edit3 111111 log superuser
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name 修改 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 111111 log
|
||||
#查询修改对象
|
||||
Ui-User-Search-Name edit-1
|
||||
#删除对象
|
||||
|
||||
|
||||
create-user-008
|
||||
#新建Accounts
|
||||
CreatePage @#!&* *^%$1 *^%$ log superuser
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name @#!&* 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} @#!&*
|
||||
#删除对象
|
||||
|
||||
|
||||
edit-user-009
|
||||
#新建Accounts
|
||||
CreatePage 修改ss edit1 111111 log superuser
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name 修改ss 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ый1 close
|
||||
#查询修改对象
|
||||
Ui-User-Search-Name 要修改了啊
|
||||
#删除对象
|
||||
|
||||
|
||||
create-user-010
|
||||
#新建Accounts
|
||||
CreatePage @#!&* *^%$1 *^%$ log superuser
|
||||
#验证新建是否成功
|
||||
Ui-User-Search-Name * User 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} *
|
||||
#删除对象
|
||||
|
||||
|
||||
create-user-011
|
||||
#新建Accounts
|
||||
CreatePage @#!&* *^%$1 *^%$ log superuser
|
||||
#验证新建是否成功
|
||||
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} @
|
||||
#删除对象
|
||||
|
||||
|
||||
delete-user-012
|
||||
#新建Accounts
|
||||
CreatePage @#!&* *^%$1 *^%$ log superuser
|
||||
#验证新建是否成功
|
||||
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-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
|
||||
|
||||
Reference in New Issue
Block a user