Test_SNF_ECMS_48_ManageCategory_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 Sites Management driver
waitForElementPresent link=Sites Management
click link=Sites Management
pause 1000
echo --Create a Article document
waitForElementPresent link=Add Document
click link=Add Document
pause 1000
waitForElementPresent link=Article
click link=Article
waitForElementPresent title
type title Test_SNF_ECMS_48
type name Test_SNF_ECMS_48
waitForElementPresent //td[@id='cke_contents_summary']/iframe
selectFrame //td[@id='cke_contents_summary']/iframe
type //html/body Test_SNF_ECMS_48
selectFrame relative=top
selectFrame //td[@id='cke_contents_content']/iframe
type //html/body Test_SNF_ECMS_48
selectFrame relative=top
waitForElementPresent link=Save & Close
click link=Save & Close
pause 1000
echo --Open Add Category form
waitForElementPresent link=Test_SNF_ECMS_48
click link=Test_SNF_ECMS_48
waitForElementPresent link=Manage Categories
click link=Manage Categories
echo --Go to Select category Tab
waitForElementPresent //div[text()='Select category']
click //div[text()='Select category']
echo -- Choose Category
waitForElementPresent //img[@title='Add root node']
click //img[@title='Add root node']
pause 1000
echo --Delete category
waitForElementPresent //img[@title='Delete']
click //img[@title='Delete']
assertConfirmation Do you really want to delete this reference?
waitForElementNotPresent //img[@title='Delete']
verifyElementNotPresent //img[@title='Delete']
waitForElementPresent link=Close
click link=Close
echo -- Delete document
waitForElementPresent link=Test_SNF_ECMS_48
mouseDownRight link=Test_SNF_ECMS_48
waitForElementPresent link=Delete
click link=Delete
waitForElementPresent //div[@id='UIPopupWindow']//a[text()="OK"]
click //div[@id='UIPopupWindow']//a[text()="OK"]
echo --Delete yes or No ?
pause 1000
waitForTextNotPresent Test_SNF_ECMS_48
verifyTextNotPresent Test_SNF_ECMS_48
echo --Logout
waitForElementPresent link=Sign out
clickAndWait link=Sign out