Test_ANS_08_002
open /ksdemo/public/classic/
windowMaximize
echo Step 1: Create category
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
waitForElementPresent eventCategoryName
type eventCategoryName Test_ANS_08_002
type description Add new question by the right click menu
waitForElementPresent link=Save
click link=Save
echo Step 2: Open Submit question form
waitForElementPresent //div[6]/div/a/span
contextMenu //div[6]/div/a/span
clickAt //div[@id='UIFAQPopupCategories2']/div/div/div/div/div[4]/a
echo Step 3: Submit Question
waitForTextPresent Question :
waitForElementPresent QuestionTitle
type QuestionTitle Question Test_ANS_08_002
selectFrame //*[@id="Question___Frame"]
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
waitForElementPresent //html/body
type //html/body Cuộc tình đó ngày đó bao nhiêu mơ mộng. Một mình anh bước trong mai đêm với bóng ai
selectFrame relative=top
type EmailAddress root@localhost.com
waitForElementPresent link=Save
clickAt link=Save 1,1
echo confirm OK
waitForElementPresent //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a
clickAt //div[3]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a 1
waitForElementPresent //div[6]/div/a/span
click //div[6]/div/a/span
waitForElementPresent link=Question Test_ANS_08_002
click link=Question Test_ANS_08_002
waitForText //tr[2]/td/div/div/div[1] Question Test_ANS_08_002
verifyText //tr[2]/td/div/div/div[1] Question Test_ANS_08_002
waitForText //p Cuộc tình đó ngày đó bao nhiêu mơ mộng. Một mình anh bước trong mai đêm với bóng ai
verifyText //p Cuộc tình đó ngày đó bao nhiêu mơ mộng. Một mình anh bước trong mai đêm với bóng ai
waitForElementPresent //td[1]/div/div[2]/div[2]/div/div[1]/div
click //td[1]/div/div[2]/div[2]/div/div[1]/div
echo ========detele data
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_21_002
verifyTextNotPresent Test_ANS_21_002
waitForElementPresent link=Sign out
clickAndWait link=Sign out