Test_ANS_01_009
open /ksdemo/public/classic/
windowMaximize
echo Step 1: Select parent category
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
waitForElementPresent //div[@id='PortalNavigationTopContainer']/div[4]/div/div/div/div/div/div/a
clickAndWait //div[@id='PortalNavigationTopContainer']/div[4]/div/div/div/div/div/div/a
waitForElementPresent //div[4]/div/a/span
click //div[4]/div/a/span
echo Step 2: Show Add new category form
waitForElementPresent link=Category
waitForElementPresent link=Category
click link=Category
waitForElementPresent link=Add category
mouseDownRight link=Add category
echo Step 2: Add new category
waitForElementPresent eventCategoryName
type eventCategoryName Test_ANS_01_009
type description Add new sub-category into a category
waitForElementPresent link=Save
clickAt link=Save 1,1
waitForText //div[2]/div/a/span Test_ANS_01_009
verifyText //div[2]/div/a/span Test_ANS_01_009
waitForElementPresent //div[@id='AnswersContainer']/div/div[1]/div
click //div[@id='AnswersContainer']/div/div[1]/div
waitForTextNotPresent Test_ANS_01_009
verifyTextNotPresent //div[2]/div/a/span Test_ANS_01_009
echo -- Detele Category --
waitForElementPresent //div[4]/div/a/span
click //div[4]/div/a/span
waitForElementPresent //div[2]/div/a/span
mouseOver //div[2]/div/a/span
contextMenu //div[2]/div/a/span
mouseDownRight //div[@id='UIFAQPopupCategories0']/div/div/div/div/div[6]/a
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent Test_ANS_01_001
verifyTextNotPresent Test_ANS_01_001
clickAndWait link=Sign out
waitForElementPresent //div[@id='PortalNavigationTopContainer']/div[4]/div/div/div/div/div/div/a
clickAndWait //div[@id='PortalNavigationTopContainer']/div[4]/div/div/div/div/div/div/a
waitForTextNotPresent Test_ANS_01_009
verifyTextNotPresent Test_ANS_01_009