Test_SNF_PRL_05_RecoverUserNameOrPassword
open /portal/classic/
echo -- Recover your user name or password--
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']
echo -- Add new user --
clickAndWait link=New Staff
waitForElementPresent username
type username Test_SNF_PRL_05
waitForElementPresent password
type password Test_SNF_PRL_05
waitForElementPresent Confirmpassword
type Confirmpassword Test_SNF_PRL_05
waitForElementPresent firstName
type firstName Test_SNF_PRL_05
waitForElementPresent lastName
type lastName Test_SNF_PRL_05
waitForElementPresent email
type email exomailtest@gmail.com
echo -- Choose User Profile --
waitForElementPresent //div[text()='User Profile']
click //div[text()='User Profile']
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[@id="UIAccountPortlet"]//a[text()="OK"]
click //div[@id="UIAccountPortlet"]//a[text()="OK"]
clickAndWait link=Sign out
echo -- Check Forgot User Name/Password--
click link=Sign in
verifyTextPresent
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[contains(@onclick,'componentId=_')]//a
click //div[contains(@onclick,'componentId=_')]//a
waitForElementPresent link=Back
click link=Back
waitForElementPresent link=Back
click link=Back
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 //html/body//span//b[text()='Password and username reminder']
waitForElementPresent //html/body//a[contains(@href,'RecoveryPasswordAndUsername')]
storeAttribute //html/body//a[contains(@href,'RecoveryPasswordAndUsername')]@href resetPas
waitForElementPresent //a[text()='Sign out']
click //a[text()='Sign out']
echo -- Change password-- ${resetPas}
open ${resetPas}
type newpassword exonewpass
waitForElementPresent newpassword
type confirmnewpassword exonewpass
waitForElementPresent link=Save
click link=Save
waitForTextPresent The password has been changed.
verifyTextPresent The password has been changed.
waitForElementPresent //div[@id='UIPortalApplication']//div[5]//div[@title='Close Window']
click //div[@id='UIPortalApplication']//div[5]//div[@title='Close Window']
echo -- Login by new user after change password--
open /portal/classic/
click link=Sign in
waitForElementPresent username
type username Test_SNF_PRL_05
type password exonewpass
clickAndWait //div[@id='UIPortalLoginFormAction']
waitForElementPresent link=Test_SNF_PRL_05 Test_SNF_PRL_05
verifyElementPresent link=Test_SNF_PRL_05 Test_SNF_PRL_05
waitForElementPresent link=Sign out
clickAndWait link=Sign out
click link=Sign in
waitForElementPresent username
type username root
type password gtn
click //a[@id='UIPortalLoginFormAction']
waitForElementPresent link=Users and Groups Manager
clickAndWait link=Users and Groups Manager
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 Empty data
verifyTextPresent Empty data
waitForElementPresent link=Sign out
clickAndWait link=Sign out