SA_CleanUpTest
store eval(selenium.isElementPresent('link=Back to Guest')) InControlPanel
gotoIf !${InControlPanel} NotInControlPanel
clickAtAndWait link=Back to Guest
label NotInControlPanel
clickAtAndWait //div[@id='_145_myPlacesContainer']/ul/li[6]/a/span
waitForElementPresent //div[3]/ul/li[3]/span/a
store eval(selenium.isElementPresent('link=Blogs Scope Permissions Page')) ScopePagePresent
gotoIf !${ScopePagePresent} ScopePageNotPresent
clickAtAndWait link=Blogs Scope Permissions Page
pause 5000
store eval(selenium.isElementPresent('//span[3]/a/img')) ScopePortletPresent
gotoIf !${ScopePortletPresent} ScopePortletNotPresent
store eval(selenium.isElementPresent('link=Delete')) EntryAPresent
gotoIf !${EntryAPresent} EntryANotPresent
clickAndWait link=Delete
assertConfirmation Are you sure you want to delete this?
label EntryANotPresent
store eval(selenium.isElementPresent('link=Delete')) EntryBPresent
gotoIf !${EntryBPresent} EntryBNotPresent
clickAndWait link=Delete
assertConfirmation Are you sure you want to delete this?
label EntryBNotPresent
click //img[@alt='Remove']
assertConfirmation Are you sure you want to remove this component?
label ScopePortletNotPresent
clickAtAndWait link=Scope Test Page
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?
label ScopePageNotPresent
clickAtAndWait link=Guest
pause 5000
clickAtAndWait link=Blogs Permissions Page
pause 5000
store eval(selenium.isElementPresent('//span[3]/a/img')) GuestPortletPresent
gotoIf !${GuestPortletPresent} GuestPortletNotPresent
store eval(selenium.isElementPresent('link=Delete')) EntryCPresent
gotoIf !${EntryCPresent} EntryCNotPresent
clickAndWait link=Delete
assertConfirmation Are you sure you want to delete this?
label EntryCNotPresent
click //img[@alt='Remove']
assertConfirmation Are you sure you want to remove this component?
label GuestPortletNotPresent
clickAt link=Application
waitForElementPresent //div[@id='Collaboration-Blogs']/p/a
clickAt //div[@id='Collaboration-Blogs']/p/a
waitForElementPresent //input[@value='Add Blog Entry']