Test_SNF_KS_05_ksdemo_ManageWatchCategory
open /ksdemo/public/classic/
windowMaximize
echo --  Login by Admin
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']//a[text()="Sign in"]
echo --  Answers Pages
open /ksdemo/private/classic/answers
echo -Category
waitForElementPresent link=Category
click link=Category
echo -Add Category-
waitForElementPresent link=Add category
mouseDown link=Add category
waitForElementPresent eventCategoryName
type eventCategoryName SNF_KS_05
waitForElementPresent description
type description The discription for SNF_KS_05
waitForElementPresent link=Save
click link=Save
echo -Watch Category-
waitForElementPresent //a[@title="SNF_KS_05"]
mouseOver //a[@title="SNF_KS_05"]
contextMenu //a[@title="SNF_KS_05"]
mouseDownRight //div[@id='UIFAQPopupCategories2']//a[@class="IconItem Watch"]
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.
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
waitForElementPresent //div[@id='AnswersContainer']//a[@class='WatchManager']
verifyElementPresent //div[@id='AnswersContainer']//a[@class='WatchManager']
echo -Mange Watch-
waitForElementPresent //div[@class='UICategories']//a[@title="Manage watches"]
click //div[@class='UICategories']//a[@title="Manage watches"]
echo -Edit Watch
waitForElementPresent //form[@id='UIWatchManager']//div[@title="Edit"]
click //form[@id='UIWatchManager']//div[@title="Edit"]
waitForElementPresent emailAddress0
type emailAddress0 root@localhost.vn
click link=Save
waitForTextPresent root@localhost.vn
verifyTextPresent root@localhost.vn
waitForElementPresent //form[@id='UIWatchManager']//div[@title="Edit"]
click //form[@id='UIWatchManager']//div[@title="Edit"]
click //img[@title='Add Item']
waitForElementPresent emailAddress1
type emailAddress1 hello@yahoo.com
click link=Save
waitForTextPresent hello@yahoo.com
verifyTextPresent hello@yahoo.com
waitForElementPresent //form[@id='UIWatchManager']//div[@title="Edit"]
click //form[@id='UIWatchManager']//div[@title="Edit"]
echo -- Delete seconds
waitForElementPresent //div[2]/img[1]
click //div[2]/img[1]
click link=Save
waitForTextNotPresent hello@yahoo.com
verifyTextNotPresent hello@yahoo.com
echo -- Remove Watch
waitForElementPresent //form[@id='UIWatchManager']//div[@class="DeleteWatchIcon"]
click //form[@id='UIWatchManager']//div[@class="DeleteWatchIcon"]
assertConfirmation Are you sure you want to delete this watch?
waitForTextNotPresent root@localhost.vn
verifyTextNotPresent root@localhost.vn
echo -Close
waitForElementPresent //form[@id='UIWatchManager']//a[text()="Close"]
click //form[@id='UIWatchManager']//a[text()="Close"]
echo -Delete Test Data-
waitForElementPresent //a[@title="SNF_KS_05"]
mouseOver //a[@title="SNF_KS_05"]
contextMenu //a[@title="SNF_KS_05"]
waitForElementPresent //div[@id='UIFAQPopupCategories2']//a[@class="IconItem DeleteCategory"]
mouseDownRight //div[@id='UIFAQPopupCategories2']//a[@class="IconItem DeleteCategory"]
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent SNF_KS_05
verifyTextNotPresent SNF_KS_05
echo -Sign out
waitForElementPresent link=Sign out
clickAndWait link=Sign out