Test_ANS_02_005
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 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_02_005
type description Edit category in case valid data entry for Moderator fields
verifyElementPresent userPrivate
type userPrivate mary
waitForElementPresent link=Save
click link=Save
echo Check
waitForElementPresent link=Sign out
clickAndWait link=Sign out
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username mary
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[6]/div/a/span
verifyElementPresent //div[6]/div/a/span
waitForElementPresent link=Sign out
clickAndWait link=Sign out
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
verifyElementPresent css=a[title="Test_ANS_02_005"]
contextMenu css=a[title="Test_ANS_02_005"]
verifyElementPresent //div[@id='UIFAQPopupCategories2']/div/div/div/div/div[5]/a
clickAt //div[@id='UIFAQPopupCategories2']/div/div/div/div/div[5]/a 1,1
verifyElementPresent userPrivate
type userPrivate demo
waitForElementPresent link=Save
clickAt link=Save 1,1
echo Check again
waitForElementPresent link=Sign out
clickAndWait link=Sign out
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username mary
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
waitForElementNotPresent //div[6]/div/a/span
verifyElementNotPresent //div[6]/div/a/span
echo -- Detele Category --
waitForElementPresent link=Sign out
clickAndWait link=Sign out
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[6]/div/a/span
mouseOver //div[6]/div/a/span
contextMenu //div[6]/div/a/span
mouseDownRight //div[@id='UIFAQPopupCategories2']/div/div/div/div/div[6]/a
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent Test_ANS_02_005
verifyTextNotPresent Test_ANS_02_005
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_02_005
verifyTextNotPresent Test_ANS_02_005