Test_SNF_KS_04_ksdemo_WatchUnWatchCategory
open /ksdemo/public/classic/
windowMaximize
echo -Login by root
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
waitForElementPresent password
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']//a[text()="Sign in"]
echo -Go to Answer pages
open /ksdemo/private/classic/answers
echo -Category Iteams
waitForElementPresent link=Category
click link=Category
echo -Add Category-
waitForElementPresent link=Add category
mouseDown link=Add category
waitForElementPresent eventCategoryName
type eventCategoryName SNF_KS_04
waitForElementPresent description
type description The description for SNF_KS_04
echo -Save
waitForElementPresent link=Save
click link=Save
echo -Watch Category-
waitForElementPresent //a[@title="SNF_KS_04"]
mouseOver //a[@title="SNF_KS_04"]
contextMenu //a[@title="SNF_KS_04"]
mouseDownRight //div[@id='UIFAQPopupCategories2']//a[@class="IconItem Watch"]
echo --  Check Popup Message Content
waitForText //div[@class="PopupMessage"] You are watching this category, you will be notified about all changes.
verifyText //div[@class="PopupMessage"] You are watching this category, you will be notified about all changes.
echo -OK
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
echo -UnWatch Category-
waitForElementPresent //a[@title="SNF_KS_04"]
mouseOver //a[@title="SNF_KS_04"]
contextMenu //a[@title="SNF_KS_04"]
mouseDownRight //div[@id='UIFAQPopupCategories2']//a[@class="IconItem UnWatch"]
echo -Delete Test Data-
waitForElementPresent //a[@title="SNF_KS_04"]
mouseOver //a[@title="SNF_KS_04"]
contextMenu //a[@title="SNF_KS_04"]
mouseDownRight //div[@id='UIFAQPopupCategories2']//a[@class="IconItem DeleteCategory"]
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent SNF_KS_04
verifyTextNotPresent SNF_KS_04
echo -Sign out
waitForElementPresent link=Sign out
clickAndWait link=Sign out