Test_ANS_01_002
open /ksdemo/public/classic/
windowMaximize
echo Step 1: Show Add new category form
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
contextMenu //div[4]/div/a/span
mouseDownRight //div[@id='UIFAQPopupCategories1']/div/div/div/div/div[3]/a
echo Step 2: Add new category with specific category
waitForElementPresent eventCategoryName
type eventCategoryName Test_ANS_01_002
type description Add new category by the right click menu
waitForElementPresent link=Save
clickAt link=Save 1,1
waitForElementPresent //div[4]/div/a/span
click //div[4]/div/a/span
waitForText //a/span Test_ANS_01_002
verifyText //a/span Test_ANS_01_002
echo -- Detele Category --
waitForElementPresent //a/span
mouseOver //a/span
contextMenu //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_002
verifyTextNotPresent Test_ANS_01_002
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_002
verifyTextNotPresent Test_ANS_01_002