open |
/portal/public/classic/ |
|
echo |
-- Check existing user name function when add new account-- |
|
windowMaximize |
|
|
click |
link=Sign in |
|
waitForElementPresent |
username |
|
type |
username |
root |
type |
password |
gtn |
clickAndWait |
//div[@id='UIPortalLoginFormAction']/div/div/div/a |
|
echo |
-- Go to New Account-- |
|
clickAndWait |
link=New Staff |
|
echo |
-- Add new user-- |
|
waitForElementPresent |
username |
Test_PRL_01_010 |
type |
username |
Test_PRL_01_010 |
type |
password |
Test_PRL_01_010 |
type |
Confirmpassword |
Test_PRL_01_010 |
type |
firstName |
Test_PRL_01_010 |
type |
lastName |
Test_PRL_01_010 |
type |
email |
Test_PRL_01_010@gmail.com |
waitForElementPresent |
//div[@id='UIAccountPortlet']/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div |
|
click |
//div[@id='UIAccountPortlet']/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div |
|
waitForElementPresent |
link=Save |
|
click |
link=Save |
|
waitForTextPresent |
You have registered a new account. |
|
verifyTextPresent |
You have registered a new account. |
|
waitForElementPresent |
//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a |
|
click |
//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a |
|
waitForElementPresent |
//div[@id='UIAccountPortlet']/div[1]/div/div/div/div/div/div/div/div/div[1]/div/div/div/div |
|
click |
//div[@id='UIAccountPortlet']/div[1]/div/div/div/div/div/div/div/div/div[1]/div/div/div/div |
|
echo |
-- Check Availability function when new account's user name is existing-- |
|
waitForElementPresent |
username |
|
type |
username |
Test_PRL_01_010 |
waitForElementPresent |
//img[@title='Check Availability'] |
|
click |
//img[@title='Check Availability'] |
|
waitForTextPresent |
This user name already exists, please enter a different name. |
|
verifyTextPresent |
This user name already exists, please enter a different name. |
|
echo |
-- Close message-- |
|
waitForElementPresent |
//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a |
|
click |
//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a |
|
echo |
-- Check Availability function when new account's user name does not exist-- |
|
waitForElementPresent |
username |
|
type |
username |
Test |
waitForElementPresent |
//img[@title='Check Availability'] |
|
click |
//img[@title='Check Availability'] |
|
waitForTextPresent |
This user name is available. |
|
verifyTextPresent |
This user name is available. |
|
echo |
-- Close message-- |
|
waitForElementPresent |
//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a |
|
click |
//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a |
|
echo |
-- Go to user and group management-- |
|
waitForElementPresent |
link=Users and groups management |
|
click |
link=Users and groups management |
|
waitForElementPresent |
searchTerm |
|
type |
searchTerm |
Test_PRL_01_010 |
waitForElementPresent |
//form[@id='UISearchForm']/div[2]/a |
|
click |
//form[@id='UISearchForm']/div[2]/a |
|
echo |
-- Delete user-- |
|
waitForElementPresent |
//img[@alt='DeleteUser'] |
|
click |
//img[@alt='DeleteUser'] |
|
assertConfirmation |
Are you sure you want to delete Test_PRL_01_010 user? |
|
echo |
-- Go to New Staff-- |
|
waitForElementPresent |
link=New Staff |
|
click |
link=New Staff |
|
echo |
-- Check Availability function when new account's user name is the same with deleted account's user name-- |
|
waitForElementPresent |
username |
|
type |
username |
Test_PRL_01_010 |
waitForElementPresent |
//img[@title='Check Availability'] |
|
click |
//img[@title='Check Availability'] |
|
waitForTextPresent |
This user name is available. |
|
verifyTextPresent |
This user name is available. |
|
waitForElementPresent |
//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div |
|
click |
//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div |
|
echo |
-- Check Availability function when new account's user name is blank-- |
|
waitForElementPresent |
username |
|
type |
username |
|
waitForElementPresent |
//img[@title='Check Availability'] |
|
click |
//img[@title='Check Availability'] |
|
waitForTextPresent |
The user name cannot be empty. |
|
verifyTextPresent |
The user name cannot be empty. |
|
waitForElementPresent |
//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div |
|
click |
//div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div |
|
clickAndWait |
link=Sign out |
|