Test_SNF_ECMS_25_CreateEditDeleteFile_ecmdemo
open /ecmdemo/public/acme/
windowMaximize
echo -- Login
click link=Login
waitForElementPresent username
type username root
type password gtn
clickAndWait link=Sign in
echo -- Go to Sites Explorer
clickAndWait //a[@href='/ecmdemo/groups/:platform:web-contributors/siteExplorer']
echo --Open  driver pane
waitForElementPresent //div[@title='Show Drives']
click //div[@title='Show Drives']
echo --Open Site Management driver
waitForElementPresent link=Sites Management
click link=Sites Management
pause 1000
echo --Add File
waitForElementPresent link=Add Document
click link=Add Document
pause 1000
waitForElementPresent link=File
click link=File
pause 1000
waitForElementPresent name
type name FileTest_SNF_ECMS_25
waitForElementPresent //td[@id='cke_contents_contentHtml']/iframe
selectFrame //td[@id='cke_contents_contentHtml']/iframe
type //html/body Test_SNF_ECMS_25
selectFrame relative=top
echo --Save as Draft
waitForElementPresent link=Save
click link=Save
pause 1000
echo --Close the form
waitForElementPresent link=Close
click link=Close
pause 1000
verifyElementPresent link=FileTest_SNF_ECMS_25
echo --Edit File
waitForElementPresent link=Edit Document
click link=Edit Document
waitForElementPresent //td[@id='cke_contents_contentHtml']/iframe
selectFrame //td[@id='cke_contents_contentHtml']/iframe
type //html/body Test_SNF_ECMS_25_edit
selectFrame relative=top
echo --Save as Draft
waitForElementPresent link=Save
click link=Save
pause 1000
echo --Close the form
waitForElementPresent link=Close
click link=Close
pause 1000
selectFrame //iframe[@class='ECMIframe']
verifyTextPresent Test_SNF_ECMS_25_edit
selectFrame relative=top
echo --Delete File
waitForElementPresent link=FileTest_SNF_ECMS_25
mouseDownRight link=FileTest_SNF_ECMS_25
waitForElementPresent link=Delete
click link=Delete
waitForElementPresent //div[@id='UIPopupWindow']//a[text()='OK']
click //div[@id='UIPopupWindow']//a[text()='OK']
pause 1000
waitForElementNotPresent link=FileTest_SNF_ECMS_25
verifyElementNotPresent link=FileTest_SNF_ECMS_25
echo --Logout
waitForElementPresent link=Sign out
clickAndWait link=Sign out