Test_SNF_KS_04_ksdemo_WatchUnWatchCategory
open /portal/public/intranet/
windowMaximize
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /portal/private/intranet/answers
echo -Add Category-
waitForElementPresent link=Category
click link=Category
waitForElementPresent //div[@id='FAQCategroManager']//a[text()='Add Category']
clickAt //div[@id='FAQCategroManager']//a[text()='Add Category']
waitForElementPresent eventCategoryName
type eventCategoryName SNF_KS_04
waitForElementPresent description
type description SNF_KS_04 des
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=SNF_KS_04
verifyElementPresent link=SNF_KS_04
echo -Watch Category-
waitForElementPresent //div[@id='AnswersContainer']//a[@title='SNF_KS_04']
mouseOver //div[@id='AnswersContainer']//a[@title='SNF_KS_04']
contextMenu //div[@id='AnswersContainer']//a[@title='SNF_KS_04']
waitForElementPresent //div[@id='UIFAQPopupCategories0']//a[text()='Watch']
mouseDownRight //div[@id='UIFAQPopupCategories0']//a[text()='Watch']
waitForTextPresent You are watching this category, you will be notified about all changes.
verifyTextPresent You are watching this category, you will be notified about all changes.
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
echo -UnWatch Category-
waitForElementPresent //div[@id='AnswersContainer']//a[@title='SNF_KS_04']
mouseOver //div[@id='AnswersContainer']//a[@title='SNF_KS_04']
contextMenu //div[@id='AnswersContainer']//a[@title='SNF_KS_04']
waitForElementPresent //div[@id='UIFAQPopupCategories0']//a[text()='Unwatch']
mouseDownRight //div[@id='UIFAQPopupCategories0']//a[text()='Unwatch']
echo -Delete Test Data-
waitForElementPresent //div[@id='AnswersContainer']//a[@title='SNF_KS_04']
mouseOver //div[@id='AnswersContainer']//a[@title='SNF_KS_04']
contextMenu //div[@id='AnswersContainer']//a[@title='SNF_KS_04']
waitForElementPresent //div[@id='UIFAQPopupCategories0']//a[text()='Delete']
mouseDownRight //div[@id='UIFAQPopupCategories0']//a[text()='Delete']
assertConfirmation Are you sure to delete this category?
waitForTextNotPresent SNF_KS_04
verifyTextNotPresent SNF_KS_04
waitForElementPresent link=Logout
clickAndWait link=Logout
waitForTextPresent Sign in