Test_SNF_ECMS_01_CreateSCVbyAddNewContent_ecmdemo
open /portal/public/acme/
windowMaximize
echo -- Log in
waitForElementPresent link=Login
click link=Login
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
echo -- Create document
waitForElementPresent link=Sites Explorer
clickAndWait link=Sites Explorer
waitForElementPresent //div[@id='UISideBar']/div/div[1]/div[2]/div[1]/div/div/div/a/div
click //div[@id='UISideBar']/div/div[1]/div[2]/div[1]/div/div/div/a/div
waitForElementPresent link=Sites Management
click link=Sites Management
pause 5000
echo go to acme
waitForElementPresent //div[@id='iconTreeExplorer']/div[2]/a
click //div[@id='iconTreeExplorer']/div[2]/a
waitForElementPresent link=documents
click link=documents
waitForElementPresent link=Add Document
click link=Add Document
waitForElementPresent //select[@name='selectTemplate']
select //select[@name='selectTemplate'] Article
waitForElementPresent title
type title Test_SNF_ECMS_01
type name Test_SNF_ECMS_01
waitForElementPresent //td[@id='cke_contents_summary']/iframe
selectFrame //td[@id='cke_contents_summary']/iframe
type //html/body Manchester
selectFrame relative=top
selectFrame //td[@id='cke_contents_content']/iframe
type //html/body Manchester United FC
selectFrame relative=top
waitForElementPresent link=Save as Draft
click link=Save as Draft
pause 5000
waitForElementPresent link=Close
click link=Close
pause 5000
echo -- Create new page
waitForElementPresent link=Overview
clickAndWait link=Overview
waitForElementPresent link=Add Page
click link=Add Page
waitForElementPresent //div[@id='UIPageNodeSelector']/div/div/div[2]/div/div/div/div[1]/a
click //div[@id='UIPageNodeSelector']/div/div/div[2]/div/div/div/div[1]/a
waitForElementPresent pageName
type pageName ASNFECMS01
echo step 2
waitForElementPresent //div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div
click //div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div
echo step 3
waitForElementPresent //div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div
click //div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div
echo Contents
waitForElementPresent link=Contents
click link=Contents
waitForElementPresent //div[text()='Content Detail']
dragAndDropToObject //div[text()='Content Detail'] //div[@id='UIPagePreview']/div[@class='UIPage']//div[@class='UIComponentBlock']
mouseOver //div/div/div[2]/div/div/div/div/div/div/a[1]
waitForElementPresent //a[@title='Edit Portlet']
click //a[@title='Edit Portlet']
waitForElementPresent //img[@alt='Select folder path']
click //img[@alt='Select folder path']
waitForElementPresent //div[@id='UIContentSelectorOne']/div[1]/div/div[2]/div/div/div/div
click //div[@id='UIContentSelectorOne']/div[1]/div/div[2]/div/div/div/div
waitForElementPresent //input[@id='name' and @name='name']
type //input[@id='name' and @name='name'] Test_SNF_ECMS_01
pause 30000
waitForElementPresent link=Search
click link=Search
waitForElementPresent //img[@title='Select']
click //img[@title='Select']
waitForElementPresent link=Save
click link=Save
pause 5000
waitForElementPresent link=Close
click link=Close
pause 5000
echo save
waitForElementPresent //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
click //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
pause 10000
waitForElementPresent link=Contenu
click link=Contenu
echo Verify title page
waitForText //div[@id='UIPresentation']/div/div[1]/div/div/div Test_SNF_ECMS_01
verifyText //div[@id='UIPresentation']/div/div[1]/div/div/div Test_SNF_ECMS_01
echo Verify title Summary
waitForText //div[@id='UIPresentation']/div/div[2]/div/div/div[1]/div[2]/div/div/div/div/div/p Manchester
verifyText //div[@id='UIPresentation']/div/div[2]/div/div/div[1]/div[2]/div/div/div/div/div/p Manchester
echo Content
waitForText //div[@id='UIPresentation']/div/div[2]/div/div/div[3]/div[2]/div/div/div/div[1]/div/p Manchester United FC
verifyText //div[@id='UIPresentation']/div/div[2]/div/div/div[3]/div[2]/div/div/div/div[1]/div/p Manchester United FC
echo -- Delete node
waitForElementPresent link=Page Manager
clickAndWait link=Page Manager
pause 10000
waitForElementPresent searchTerm
type searchTerm ASNFECMS01
select searchOption label=Title
waitForElementPresent //form[@id='UIPageSearch']/div[2]/a
click //form[@id='UIPageSearch']/div[2]/a
pause 3000
waitForElementPresent //img[@title='Delete Page']
click //img[@title='Delete Page']
assertConfirmation Do you want to delete this page?
waitForElementPresent //div[4]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
click //div[4]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
echo -- Delete node
waitForElementPresent link=My Sites
clickAndWait link=My Sites
waitForElementPresent //div[@id='UISiteManagement']/table[1]/tbody/tr/td[3]/a[2]
click //div[@id='UISiteManagement']/table[1]/tbody/tr/td[3]/a[2]
waitForElementPresent //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[13]/div/a
mouseDownRight //div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[13]/div/a
click link=Delete Node
assertConfirmation Are you sure you want to delete this node?
click link=Save
pause 5000
echo -- Delete document
waitForElementPresent link=Sites Explorer
clickAndWait link=Sites Explorer
waitForElementPresent link=Test_SNF_ECMS_01
mouseDownRight link=Test_SNF_ECMS_01
click link=Delete
waitForElementPresent //div[@id='UIPopupWindow']/div/div[2]/div/div/div/div/div/div/div/div[2]/table/tbody/tr/td/div[1]/div/div/div/a
click //div[@id='UIPopupWindow']/div/div[2]/div/div/div/div/div/div/div/div[2]/table/tbody/tr/td/div[1]/div/div/div/a
pause 5000
echo -- Logout
waitForElementPresent link=Logout
clickAndWait link=Logout