Test_SNF_CS40_ManageContactInMail
open /portal/intranet/
windowMaximize
echo -Manage contact in Mail-
waitForElementPresent //b[contains(text(),'Sign in')]
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username mary
type password gtn
clickAndWait id=UIPortalLoginFormAction
waitForElementPresent link=Mail
click link=Mail
pause 10000
echo -- Add contact in Mail
echo --- Add contact
waitForElementPresent //div[@id='MailWorkingWorkspace']/div[1]/div/div/div/div/div/div[4]/div
click //div[@id='MailWorkingWorkspace']/div[1]/div/div/div/div/div/div[4]/div
waitForElementPresent //div[@id='UIAddressBookForm']/div/div[1]/div/div/div/div/div/div/div[2]/div
click //div[@id='UIAddressBookForm']/div/div[1]/div/div/div/div/div/div/div[2]/div
waitForElementPresent first-name
type first-name Contact_40
type last-name eXo
type nickName Test
type jobTitle Tester
type email0 th4hc0n9@yahoo.com
click link=Save
pause 1000
waitForElementPresent link=Contact_40 eXo
click link=Contact_40 eXo
waitForElementPresent //div[@class='State']
verifyElementPresent //div[@class='State'] Contact_40 eXo
echo ---  Edit Contact
waitForElementPresent //div[@id='UIAddressBookForm']/div/div[1]/div/div/div/div/div/div/div[3]/div/div
click //div[@id='UIAddressBookForm']/div/div[1]/div/div/div/div/div/div/div[3]/div/div
waitForElementPresent first-name
type first-name Contact_40_Edited
click link=Save
pause 1000
click link=Contact_40_Edited eXo
waitForElementPresent link=Contact_40_Edited eXo
verifyElementPresent //div[@class='State'] link=Contact_40_Edited eXo
waitForElementPresent //div[@id='UIAddressBookForm']/div/div[2]/div/div[1]/div[2]/div[2]/table/tbody/tr[1]/td[1]/div/div
click //div[@id='UIAddressBookForm']/div/div[2]/div/div[1]/div[2]/div[2]/table/tbody/tr[1]/td[1]/div/div
pause 500
waitForElementPresent //div[@id='UIAddressBookForm']/div/div[1]/div/div/div/div/div/div/a/div/div
click //div[@id='UIAddressBookForm']/div/div[1]/div/div/div/div/div/div/a/div/div
assertConfirmation Are you sure you want to delete this contact ?
pause 500
waitForElementPresent //a/div/div/div
click //a/div/div/div
waitForElementPresent //div[@onclick='eXo.cs.Utils.show(this, event);']
click //div[@onclick='eXo.cs.Utils.show(this, event);']
clickAndWait link=Logout
close