SA_TearDownTest
waitForElementPresent link=Blogs Permissions Page
clickAtAndWait link=Blogs Permissions Page
pause 5000
store eval(selenium.isElementPresent('//span[3]/a/img')) PortletPresent
gotoIf !${PortletPresent} NoPortletPresent
store eval(selenium.isElementPresent('link=Delete')) EntryAPresent
gotoIf !${EntryAPresent} NoEntryAPresent
clickAndWait link=Delete
assertConfirmation Are you sure you want to delete this?
label NoEntryAPresent
store eval(selenium.isElementPresent('link=Delete')) EntryBPresent
gotoIf !${EntryBPresent} NoEntryBPresent
clickAndWait link=Delete
assertConfirmation Are you sure you want to delete this?
label NoEntryBPresent
click //img[@alt='Remove']
assertConfirmation Are you sure you want to remove this component?
label NoPortletPresent
clickAtAndWait link=Welcome
clickAtAndWait link=Manage Pages
waitForVisible //div[@id='_88_layoutsTreeOutput']/ul/li/ul/li[2]/a/span
clickAtAndWait //div[@id='_88_layoutsTreeOutput']/ul/li/ul/li[2]/a/span
clickAtAndWait //li[@id='_88_tabs3pageTabsId']/a
clickAndWait //input[@value='Delete']
assertConfirmation Are you sure you want to delete the selected page?
clickAtAndWait link=Return to Full Page