Test_SNF_CS42_ShareAddressBook
open /portal
windowMaximize
echo -Share Address Book-
waitForElementPresent //b[contains(text(),'Sign in')]
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username john
type password gtn
clickAndWait id=UIPortalLoginFormAction
echo -- Share address book
waitForElementPresent link=Contacts
click link=Contacts
waitForElementPresent //div[@title='My Contacts']
mouseOver //div[@title='My Contacts']
contextMenu //div[@title='My Contacts']
waitForElementPresent link=Share
click link=Share
waitForElementPresent user
type user root
click canEdit
click link=Save
type user demo
click link=Save
click link=Close
waitForElementPresent //div[@class='IconHolder SharedAddressIcon']
click link=Logout
echo -- Login by root to check shared address book
open /portal
waitForElementPresent //b[contains(text(),'Sign in')]
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait id=UIPortalLoginFormAction
waitForElementPresent link=Contacts
click link=Contacts
waitForElementPresent //div[@title='john - My Contacts']
mouseOver //div[@title='john - My Contacts']
contextMenu //div[@title='john - My Contacts']
waitForElementPresent link=Edit
clickAndWait link=Logout
echo -- Login by demo to check shared address book
open /portal
waitForElementPresent //b[contains(text(),'Sign in')]
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username demo
type password gtn
clickAndWait id=UIPortalLoginFormAction
waitForElementPresent link=Contacts
click link=Contacts
waitForElementPresent //div[@title='john - My Contacts']
click //div[@title='john - My Contacts']
waitForElementPresent link=John Anthony
click link=Logout
echo -- Login by john to remove share users
open /portal
waitForElementPresent //b[contains(text(),'Sign in')]
click //b[contains(text(),'Sign in')]
waitForElementPresent username
type username john
type password gtn
clickAndWait id=UIPortalLoginFormAction
waitForElementPresent link=Contacts
click link=Contacts
waitForElementPresent //div[@title='My Contacts']
mouseOver //div[@title='My Contacts']
contextMenu //div[@title='My Contacts']
waitForElementPresent //div[@id='tmpMenuElement']/div/div[2]/div/div/div[4]/a
click //div[@id='tmpMenuElement']/div/div[2]/div/div/div[4]/a
waitForElementPresent //img[@alt='Delete']
click //img[@alt='Delete']
assertConfirmation Are you sure you want to remove this permission ?
waitForElementPresent //img[@alt='Delete']
click //img[@alt='Delete']
assertConfirmation Are you sure you want to remove this permission ?
clickAndWait link=Logout
close