Test_SNF_ECMS_30_CreateEditDeletePictureHeadLayoutWebcontent_ecmdemo
open /portal/public/default/
windowMaximize
clickAndWait link=Visit the Acme Website
echo -- Log in
click link=Login
type username root
type password gtn
clickAndWait link=Sign in
echo -- Site Explorer
clickAndWait //a[@href='/portal/private/acme/siteExplorer']
echo --  Show Drives
waitForElementPresent //div[@title='Show Drives']
click //div[@title='Show Drives']
echo --  Open Private driver
waitForElementPresent link=Private
click link=Private
echo -Go to Admin View
waitForElementPresent //a[@title='Admin View']
click //a[@title='Admin View']
echo -- Go to Action tab
waitForElementPresent link=Actions
click link=Actions
echo --Add Picture on head layout webcontent
waitForElementPresent link=Add Document
click link=Add Document
waitForElementPresent selectTemplate label=Picture on head layout webcontent
select selectTemplate label=Picture on head layout webcontent
pause 3000
waitForElementPresent name
type name Test_SNF_30
type title Test_SNF_30
waitForElementPresent //td[contains(@id,'cke_contents_htmlData')]/iframe
selectFrame //td[contains(@id,'cke_contents_htmlData')]/iframe
type //html/body TieuHuongDuong! Em ghet chi lam
selectFrame relative=top
echo --Save as draft
waitForElementPresent //form[@id='UIDocumentForm']/div[2]/div[2]/table/tbody/tr/td/a[1]/div/div/div
click //form[@id='UIDocumentForm']/div[2]/div[2]/table/tbody/tr/td/a[1]/div/div/div
pause 3000
echo --Close form
waitForElementPresent //a[2]/div/div/div
click //a[2]/div/div/div
pause 3000
echo --Edit Free layout webcontent
waitForElementPresent link=Test_SNF_30
click link=Test_SNF_30
waitForTextPresent TieuHuongDuong! Em ghet chi lam
verifyTextPresent TieuHuongDuong! Em ghet chi lam
waitForElementPresent link=Edit Document
click link=Edit Document
pause 3000
waitForElementPresent name
type name Test_SNF_ECMS_30
waitForElementPresent title
type title Test_SNF_ECMS_30
waitForElementPresent //td[contains(@id,'cke_contents_htmlData')]/iframe
selectFrame //td[contains(@id,'cke_contents_htmlData')]/iframe
type //html/body Lam vo em nhe!
selectFrame relative=top
echo --  Save as draft
waitForElementPresent //a[1]/div/div/div
click //a[1]/div/div/div
pause 3000
echo --  Close form
waitForElementPresent //a[2]/div/div/div
click //a[2]/div/div/div
pause 5000
echo --  Delete Picture on head layout webcontent
waitForElementPresent link=Test_SNF_ECMS_30
mouseDownRight link=Test_SNF_ECMS_30
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
waitForElementNotPresent link=Picture on head layout webcontent edit
verifyElementNotPresent link=Picture on head layout webcontent edit
echo --Logout
waitForElementPresent link=Logout
clickAndWait link=Logout