SA_CleanUpTest
open /web/guest/home/
waitForElementPresent //li[6]/a/span
clickAtAndWait //li[6]/a/span
store eval(selenium.isElementPresent('link=Blogs Scope Permissions Page')) ScopePagePresent
gotoIf !${ScopePagePresent} ScopePageNotPresent
clickAtAndWait link=Blogs Scope Permissions Page
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 //div/div[3]/div/ul/li[1]/a
waitForText //div/div[3]/a Scope Community
waitForText //li/ul/li[1]/div/div[3]/a Scope Test Page
clickAtAndWait //li[2]/div/div[3]/a
clickAtAndWait //ul[2]/li[1]/span/span/a
clickAndWait //input[@value='Delete']
assertConfirmation Are you sure you want to delete the selected page?
label ScopePageNotPresent
open /web/guest/home/
waitForElementPresent link=Blogs Permissions Page
clickAtAndWait link=Blogs Permissions Page
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 _145_addApplication
pause 5000
waitForVisible layout_configuration_content
typeKeys layout_configuration_content b
waitForElementPresent //div[@title='Blogs']/p/a
clickAt //div[@title='Blogs']/p/a
waitForElementPresent //input[@value='Add Blog Entry']