Test_PRL_01_026_CreateNewAccoutWhenSelectlanguageForUser
open /portal/public/classic/
echo -- Create new account when select language for user--
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 Staff--
clickAndWait link=New Staff
waitForElementPresent username
type username Test_PRL_01_026
type password Test_PRL_01_026
type Confirmpassword Test_PRL_01_026
type firstName Test_PRL_01_026
type lastName Test_PRL_01_026
type email Test_PRL_01_026@gmail.com
echo -- Choose user profile--
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
echo -- Choose languagefor user--
waitForElementPresent user.language
select user.language label=Spanish
click link=Save
waitForTextPresent You have registered a new account.
verifyTextPresent You have registered a new account.
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
clickAndWait link=Sign out
echo -- Sign in with new user--
open /portal/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username Test_PRL_01_026
type password Test_PRL_01_026
click //div[@id='UIPortalLoginFormAction']/div/div/div/a
waitForElementPresent link=Test_PRL_01_026 Test_PRL_01_026
verifyText link=Test_PRL_01_026 Test_PRL_01_026 Test_PRL_01_026 Test_PRL_01_026
waitForElementPresent link=Desconectar
clickAndWait link=Desconectar
echo -- Login with administrator to delete new user--
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
click //div[@id='UIPortalLoginFormAction']/div/div/div/a
echo -- Go to user and group management--
waitForElementPresent link=Users and groups management
click link=Users and groups management
echo -- Search new user inlist--
waitForElementPresent searchTerm
type searchTerm Test_PRL_01_026
waitForElementPresent //form[@id='UISearchForm']/div[2]/a
click //form[@id='UISearchForm']/div[2]/a
echo -- Delete new user--
waitForElementPresent //img[@alt='DeleteUser']
click //img[@alt='DeleteUser']
assertConfirmation Are you sure you want to delete Test_PRL_01_026 user?
clickAndWait link=Sign out