Create New Users
-Creates new users
openAndWait / (open the main interface)
comment Wait for page to load up
waitForDispatchCompleted 30000
clickAndWait //a[@href='/admin/settings']
selectWindow queryFetcher (hereafter, all selenium commands will act within the context of this iframe
clickAndWait //a[@href='/admin/users']
clickAndWait //input[@type='button']
type //input[@name='name'] admin
type //input[@name='password'] admin
type //input[@name='passwordconfirm'] admin
type //input[@name='realName'] Admin Guy
select //select[@name='userType'] value=Admin
clickAndWait //input[@type="submit"]
verifyText //div[@class='errorHeader'] Error creating user : User Already exists
clickAndWait //a[@href='/admin/users']
verifyElementNotPresent //a[.='Delete'] delete link
clickAndWait //input[@type='button']
type //input[@name='name'] user
type //input[@name='password'] user
type //input[@name='passwordconfirm'] user
type //input[@name='realName'] User Guy
addSelection //select[@name='userType'] value=Power
addSelection //select[@name='userType'] value=User
clickAndWait //input[@type="submit"]
verifyText //div[@class='noticeHeader'] User user created successfully.
clickAndWait //input[@type='button']
type //input[@name='name'] power
type //input[@name='password'] power
type //input[@name='passwordconfirm'] power1
type //input[@name='realName'] Power Guy
select //select[@name='userType'] value=Power
clickAndWait //input[@type="submit"]
verifyText //div[@class='errorHeader'] Error creating user : The passwords you typed do not match.
type //input[@name='name'] power
type //input[@name='password'] power
type //input[@name='passwordconfirm'] power
type //input[@name='realName'] Power Guy
select //select[@name='userType'] value=Power
clickAndWait //input[@type="submit"]
verifyText //div[@class='noticeHeader'] User power created successfully.
clickAndWait //input[@type='button']
type //input[@name='name'] adminUser
type //input[@name='password'] adminUser
type //input[@name='passwordconfirm'] adminUser
type //input[@name='realName'] Admin User Guy
select //select[@name='userType'] value=Admin
clickAndWait //input[@type="submit"]
verifyText //div[@class='noticeHeader'] User adminUser created successfully.
clickAndWait //input[@type='button']
type //input[@name='name'] test
type //input[@name='password'] test
type //input[@name='passwordconfirm'] test
type //input[@name='realName']
select //select[@name='userType'] value=User
clickAndWait //input[@type="submit"]
verifyText //div[@class='errorHeader'] Error creating user : The fullname field cannot be blank.
type //input[@name='name']
type //input[@name='password'] test
type //input[@name='passwordconfirm'] test
type //input[@name='realName'] Test Guy
select //select[@name='userType'] value=User
clickAndWait //input[@type="submit"]
verifyText //div[@class='errorHeader'] Error creating user : The username field cannot be blank.
type //input[@name='name'] test
type //input[@name='password']
type //input[@name='passwordconfirm']
type //input[@name='realName'] Test Guy
select //select[@name='userType'] value=User
clickAndWait //input[@type="submit"]
verifyText //div[@class='errorHeader'] Error creating user : Empty passwords are not allowed.
open /logout 6000
type //input[@name='usr'] user
type //input[@name='pwd'] user
clickAndWait //input[@type='submit'] submit
comment Verify that the searchField and submit button are there
verifyElementPresent entry
verifyElementPresent entrySubmit
selectWindow return the focus back to the main window, in case we want to do anything else.
open /logout 6000
type //input[@name='usr'] power
type //input[@name='pwd'] power
clickAndWait //input[@type='submit'] submit
comment Verify that the searchField and submit button are there
verifyElementPresent entry
verifyElementPresent entrySubmit
open /logout 6000
type //input[@name='usr'] adminUser
type //input[@name='pwd'] adminUser
clickAndWait //input[@type='submit'] submit
comment Verify that the searchField and submit button are there
verifyElementPresent entry
verifyElementPresent entrySubmit
open /logout 6000
type //input[@name='usr'] admin
type //input[@name='pwd'] changeme
clickAndWait //input[@type='submit'] submit
comment Verify that the searchField and submit button are there
verifyElementPresent entry
verifyElementPresent entrySubmit
clickAndWait adminLink 6000
clickAndWait //a[@href='/admin/users']
clickAndWait //td[.='adminUser']/following::a[.='Delete'][1] click the first delete link following adminUser.
assertConfirmation Are you sure you want to delete this user?
verifyText //div[@class='noticeHeader'] User 'adminUser' has been deleted.
clickAndWait //td[.='power']/following::a[.='Delete'][1] click the first delete link following power.
assertConfirmation Are you sure you want to delete this user?
verifyText //div[@class='noticeHeader'] User 'power' has been deleted.
clickAndWait //td[.='user']/following::a[.='Delete'][1] click the first delete link following user.
assertConfirmation Are you sure you want to delete this user?
verifyText //div[@class='noticeHeader'] User 'user' has been deleted.
selectWindow return the focus back to the main window, in case we want to do anything else.