Test_SNF_CS43_ManageContacts
open /portal/public/intranet
windowMaximize
waitForElementPresent //div[2]/div[2]/div[1]/div/div/div[1]
click //div[2]/div[2]/div[1]/div/div/div[1]
waitForElementPresent username
type username mary
waitForElementPresent password
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/contact
pause 10000
echo -Manage contacts-
echo -- Add an Contact
waitForElementPresent link=Contact
click link=Contact
waitForElementPresent firstName
type firstName Test_43
type lastName eXo_Contact
type nickName Contact_43
type jobTitle eXo_Tester_43
type multiEmail0 Test_43@gmail.com
click link=Save
echo -- Verify contacts created
waitForElementPresent xpath=//div[@class='PersonalAddress']//div[@title='My Contacts']
click xpath=//div[@class='PersonalAddress']//div[@title='My Contacts']
waitForElementPresent link=Test_43 eXo_Contact
verifyElementPresent link=Test_43 eXo_Contact
waitForElementPresent link=Test_43@gmail.com
verifyElementPresent link=Test_43@gmail.com
echo -- Edit contact
mouseOver link=Test_43 eXo_Contact
contextMenu link=Test_43 eXo_Contact
waitForElementPresent link=Edit
click link=Edit
waitForElementPresent firstName Test_43
type firstName Test_43_Edited
type lastName eXo_Contact
type nickName Contact_43
type jobTitle eXo_Tester_43
type multiEmail0 Test_43_Edited@gmail.com
click link=Save
echo -- Verify contacts edited
waitForElementPresent xpath=//div[@class='PersonalAddress']//div[@title='My Contacts']
click xpath=//div[@class='PersonalAddress']//div[@title='My Contacts']
waitForElementPresent link=Test_43_Edited eXo_Contact
verifyElementPresent link=Test_43_Edited eXo_Contact
waitForElementPresent link=Test_43_Edited@gmail.com
verifyElementPresent link=Test_43_Edited@gmail.com
echo -- Move Contact
waitForElementPresent //tr[2]/td[1]/input
click //tr[2]/td[1]/input
waitForElementPresent //form[@id='UIContacts']/div[2]/a[1]/div
click //form[@id='UIContacts']/div[2]/a[1]/div
waitForElementPresent //div[@id='UIContactPopupWindow']
waitForElementPresent //div[2]/div[2]/div/a
click //div[2]/div[2]/div/a
waitForElementPresent //div[2]/div[3]/div
click //div[2]/div[3]/div
click //div[@id='addressesmary']/div
echo -- Delete Contact Are you sure you want to delete this contact ?
waitForElementPresent //td[1]/input
click //td[1]/input
click //form[@id='UIContacts']/div[2]/a[4]/div
assertConfirmation Are you sure you want to delete this contact ?
clickAndWait link=Logout
close