Test_SNF_ECMS_60_AdvanceSearch_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/private/acme/siteExplorer']
echo --  Open  driver pane
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
pause 10000
waitForElementPresent link=Actions
click link=Actions
pause 10000
echo --  Add Document
waitForElementPresent link=Add Document
click link=Add Document
pause 10000
waitForElementPresent title
type title Test_SNF_ECMS_60
type name Test_SNF_ECMS_60
waitForElementPresent //td[@id='cke_contents_summary']/iframe
selectFrame //td[@id='cke_contents_summary']/iframe
type //html/body Giong nhu em toi co mot noi buon
selectFrame relative=top
selectFrame //td[@id='cke_contents_content']/iframe
type //html/body Yeu sa mac nen long hay mong mo
selectFrame relative=top
waitForElementPresent link=Save as Draft
click link=Save as Draft
pause 10000
waitForElementPresent link=Close
click link=Close
pause 10000
echo --  Go to root path
waitForElementPresent //div[@title='Private']
click //div[@title='Private']
echo --  Advance search
waitForElementPresent //div[@title='Saved Searches']
click //div[@title='Saved Searches']
echo --  Open advance search form
waitForElementPresent //div[@title='Advance Search']
click //div[@title='Advance Search']
echo --  Go to Advanve Search tab
waitForElementPresent //div[@id='UIECMSearch']//div[text()='Advanced Search']
click //div[@id='UIECMSearch']//div[text()='Advanced Search']
waitForElementPresent input
type input Yeu sa mac nen long hay mong mo
waitForElementPresent //form[@id='UISimpleSearch']/div[2]/div/div/table/tbody/tr/td/div[2]/div/div/div/a
click //form[@id='UISimpleSearch']/div[2]/div/div/table/tbody/tr/td/div[2]/div/div/div/a
echo --  View this node
waitForElementPresent //img[@title='View this node']
click //img[@title='View this node']
waitForTextPresent Giong nhu em toi co mot noi buon
verifyTextPresent Giong nhu em toi co mot noi buon
waitForTextPresent Yeu sa mac nen long hay mong mo
verifyTextPresent Yeu sa mac nen long hay mong mo
echo --  Go to File Explorer
waitForElementPresent //div[@title='File explorer']
click //div[@title='File explorer']
echo --  Delete Sample node
waitForElementPresent link=Test_SNF_ECMS_60
mouseDownRight link=Test_SNF_ECMS_60
click link=Delete
waitForElementPresent //div[@id='UIJCRExplorer']//a[text()='OK']
click //div[@id='UIJCRExplorer']//a[text()='OK']
echo --  Delete ?
pause 10000
waitForElementNotPresent link=Test_SNF_ECMS_60
verifyElementNotPresent link=Test_SNF_ECMS_60
echo --  Logout
waitForElementPresent link=Sign out
clickAndWait link=Sign out