SA_CleanUpTest
open /web/scope-community/scope-test-page/
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
label ScopePageNotPresent
clickAtAndWait link=Scope Test Page
clickAt main-content
clickAt navigation
clickAt dockbar
waitForElementPresent //div/div[3]/div/ul/li[1]/a Manage Pages
clickAtAndWait //div/div[3]/div/ul/li[1]/a Manage Pages
clickAt main-content
clickAt navigation
clickAt dockbar
waitForText //div/div[3]/a Scope Community
store eval(selenium.isElementPresent('//li/ul/li[1]/div/div[3]/a')) welcomePresent
gotoIf ${welcomePresent} WelcomePresent
clickAt //li/div/div[1] Drop Down Arrow
label WelcomePresent
waitForText //li/ul/li[1]/div/div[3]/a Scope Test Page
store eval(selenium.isElementPresent('//li[2]/div/div[3]/a')) scopeBlogsPagePresent
gotoIf !${scopeBlogsPagePresent} ScopePageBlogsNotPresent
clickAndWait //li[2]/div/div[3]/a Page Name
clickAtAndWait //td[2]/ul/li[1]/span/span/a Page
clickAndWait //input[@value='Delete']
assertConfirmation Are you sure you want to delete the selected page?
label ScopePageBlogsNotPresent
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']