Test_SNF_PRL_05_RecoverUserNameOrPassword
open /portal/public/intranet/
echo -- Recover your user name or password--
windowMaximize
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- Add new user --
clickAndWait link=Add new Users
waitForElementPresent username
type username Test_SNF_PRL_05
type password Test_SNF_PRL_05
type Confirmpassword Test_SNF_PRL_05
type firstName Test_SNF_PRL_05
type lastName Test_SNF_PRL_05
type email exomailtest@gmail.com
echo -- Choose User Profile --
waitForElementPresent //div[2]/div/div/div/div/div/div/div/div[1]/div/div/div[1]/div/div/div/div/div/div/div/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
clickAndWait //div[2]/div/div/div/div/div/div/div/div[1]/div/div/div[1]/div/div/div/div/div/div/div/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div
waitForElementPresent user.language
select user.language label=English
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
clickAndWait link=Logout
echo -- Check Forgot User Name/Password--
click //div[contains(text(),'Sign in')]
waitForElementPresent link=exact:Forgot your User Name/Password?
click link=exact:Forgot your User Name/Password?
waitForElementPresent link=Next
click link=Next
waitForElementPresent username
type username Test_SNF_PRL_05
waitForElementPresent link=Send
click link=Send
waitForTextPresent An email has been sent to you.
verifyTextPresent An email has been sent to you.
waitForElementPresent //div[6]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
click //div[6]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
waitForElementPresent link=Discard
click link=Discard
echo -- Check mail --
open http://gmail.com
waitForElementPresent Email
type Email exomailtest
type Passwd exoadmin
waitForElementPresent signIn
clickAndWait signIn
selectFrame canvas_frame
mouseDown //div/div[2]/div/div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div[2]/div/div/div/div[5]/div/div/div/div/table/tbody/tr/td[5]/div/div/div/span
waitForElementPresent //html/body/div/div[2]/div/div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div[2]/div/div[2]/div/table/tr/td/div[2]/div[2]/div/div[2]/div/div/div/div/div[2]/div/div/div[2]/div[5]/div/a
storeAttribute //html/body/div/div[2]/div/div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div[2]/div/div[2]/div/table/tr/td/div[2]/div[2]/div/div[2]/div/div/div/div/div[2]/div/div/div[2]/div[5]/div/a@href resetPas
waitForElementPresent //html/body/div/div[2]/div/div/div/div[2]/div/div[4]/div/nobr/a[2]
click //html/body/div/div[2]/div/div/div/div[2]/div/div[4]/div/nobr/a[2]
echo -- Change password--
open ${resetPas}
type newpassword 123456
waitForElementPresent newpassword
type confirmnewpassword 123456
waitForElementPresent link=Save
click link=Save
waitForTextPresent The password has been changed.
verifyTextPresent The password has been changed.
waitForElementPresent //div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
click //div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
echo -- Login by new user after change password--
open /portal/public/intranet/
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username Test_SNF_PRL_05
type password 123456
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
waitForElementPresent link=Test_SNF_PRL_05 Test_SNF_PRL_05
verifyElementPresent link=Test_SNF_PRL_05 Test_SNF_PRL_05
clickAndWait link=Logout
echo -- Delete user --
open /portal/public/intranet/
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
click //div[@id='UIPortalLoginFormAction']/div/div/div/a
waitForElementPresent link=Manage Users and Groups
clickAndWait link=Manage Users and Groups
echo -- Search user --
waitForElementPresent searchTerm
type searchTerm Test_SNF_PRL_05
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']
waitForConfirmationPresent
assertConfirmation Are you sure you want to delete Test_SNF_PRL_05 user?
waitForTextPresent No result found.
verifyTextPresent No result found.
waitForElementPresent //div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
click //div[5]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
waitForElementPresent link=Logout
clickAndWait link=Logout