Test_SNF_KS_01_ksdemo_ManageCategory
open /ksdemo/public/classic/
windowMaximize
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/answers
echo -Category
waitForElementPresent link=Category
click link=Category
echo -Select Add Category on Menu
waitForElementPresent //div[@id='FAQCategroManager']//a[text()='Add Category']
clickAt //div[@id='FAQCategroManager']//a[text()='Add Category'] 1,1
waitForElementPresent eventCategoryName
type eventCategoryName SNF_KS_01
waitForElementPresent //img[@title='Select a user ']
click //img[@title='Select a user ']
waitForElementPresent demo
check demo
waitForElementPresent //form[@id='UIUserSelector']//a[text()="Add"]
click //form[@id='UIUserSelector']//a[text()="Add"]
check moderatequestions
check ViewAuthorInfor
check moderateAnswers
type description SNF_KS_01
click link=Save
echo -Edit Category-
contextMenu //a[@title="SNF_KS_01"]/span[text()='SNF_KS_01'] contextmenu
storeXpathCount //div[contains(@id,'UIFAQPopupCategories')] totals
storeEval ${totals}-1 total1
storeEval ${totals}-1 total2
waitForElementPresent //div[@id='UIFAQPopupCategories${total1}']//a[text()='Edit']
clickAt //div[@id='UIFAQPopupCategories${total1}']//a[text()='Edit'] 1,1
waitForElementPresent eventCategoryName SNF_KS_01
type eventCategoryName SNF_KS_01 Update
type index 3
type description SNF_KS_01 Desc
waitForElementPresent //form[@id='UICategoryForm']//a[text()="Save"]
click //form[@id='UICategoryForm']//a[text()="Save"]
echo -Verify the edit category-
waitForTextPresent SNF_KS_01 Update
verifyTextPresent SNF_KS_01 Update
echo -Move Category-
contextMenu //a[@title="SNF_KS_01 Update"]/span[text()='SNF_KS_01 Update']
waitForElementPresent //div[@id='UIFAQPopupCategories${total2}']//a[text()='Move']
clickAt //div[@id='UIFAQPopupCategories${total2}']//a[text()='Move'] 1,1
waitForElementPresent //a[contains(text(),'Technical FAQ')]
doubleClick //a[contains(text(),'Technical FAQ')]
waitForElementNotPresent link=SNF_KS_01 Update
verifyElementNotPresent link=SNF_KS_01 Update
waitForElementPresent //a[@title="Technical FAQ"]/span
click //a[@title="Technical FAQ"]/span
waitForElementPresent link=SNF_KS_01 Update
verifyElementPresent link=SNF_KS_01 Update
echo -Delete Category-
waitForElementPresent //a[@title="SNF_KS_01 Update"]/span[text()='SNF_KS_01 Update']
mouseOver //a[@title="SNF_KS_01 Update"]/span[text()='SNF_KS_01 Update']
contextMenu //a[@title="SNF_KS_01 Update"]/span[text()='SNF_KS_01 Update']
waitForElementPresent //div[@id='UIFAQPopupCategories2']//a[@class="IconItem DeleteCategory"]
mouseDownRight //div[@id='UIFAQPopupCategories2']//a[@class="IconItem DeleteCategory"]
verifyConfirmation Are you sure to delete this category?
waitForTextNotPresent SNF_KS_01 Update
verifyTextNotPresent SNF_KS_01 Update
waitForElementPresent link=Sign out
clickAndWait link=Sign out
waitForTextPresent Sign in