Test_ANS_21_003
open /ksdemo/public/classic/
windowMaximize
echo Step 1: Create categories & questions
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_21_003
type description Test_ANS_21_003 Test_ANS_21_003Test_ANS_21_003Test_ANS_21_003
waitForElementPresent link=Save
click link=Save
echo Submit question
waitForElementPresent //div[6]/div/a/span
click //div[6]/div/a/span
waitForElementPresent link=Submit question
click link=Submit question
waitForElementPresent QuestionTitle
type QuestionTitle Question Test_ANS_21_003
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 gọi đò ơi ! không ai có đưa đò, bên kia sông có người lấy chồng
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,1
echo Step 2: Open Manage questions form
waitForElementPresent link=Manage questions
click link=Manage questions
waitForText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[1]/th[1]/b Question
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[1]/th[1]/b Question
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[1]/th[2]/b Category
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[1]/th[3]/b Approved
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[1]/th[4]/b Activated
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[2]/td[1] exact:What does eXo Knowledge Suite contain ?
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[3]/td[1] exact:Why should I care about eXo KS ?
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[4]/td[1] exact:How do I install KS ?
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[5]/td[1] The forum does not list the currently active user.
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[6]/td[1] exact:What is the relation between Answers and FAQ ?
waitForElementPresent link=2
click link=2
waitForText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[2]/td[1] Question Test_ANS_21_003
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[2]/td[1] Question Test_ANS_21_003
echo Step 3: Show Edit Question form
waitForElementPresent //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[2]/td[5]/div[1]/div
click //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[2]/td[5]/div[1]/div
waitForElementPresent QuestionTitle
type QuestionTitle Question Test_ANS_21_003_Update
waitForElementPresent IsApproved
verifyChecked IsApproved
waitForElementPresent IsActivated
verifyChecked IsActivated
click IsApproved
click IsActivated
waitForElementPresent EmailAddress root@localhost.com.vn
type EmailAddress root@localhost.com.vn
waitForElementPresent link=Save
clickAt link=Save 1,1
waitForElementPresent //form[@id='UIQuestionManagerForm']/div[2]/table/tbody/tr/td/div/div/div/div
click //form[@id='UIQuestionManagerForm']/div[2]/table/tbody/tr/td/div/div/div/div
waitForTextNotPresent Question Test_ANS_21_003_Update
verifyTextNotPresent Question Test_ANS_21_003_Update
echo Verify Data is updated
waitForElementPresent link=Manage questions
click link=Manage questions
waitForElementPresent link=2
click link=2
waitForText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[2]/td[1] Question Test_ANS_21_003_Update
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[2]/td[1] Question Test_ANS_21_003_Update
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[2]/td[3]/div/div No
click //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[2]/td[3]/div/div No
verifyText //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[2]/td[4]/div/div No
click //div[@id='UITabContent']/div/div[1]/div/table/tbody/tr[2]/td[4]/div/div No
waitForElementPresent //form[@id='UIQuestionManagerForm']/div[2]/table/tbody/tr/td/div/div/div/div
click //form[@id='UIQuestionManagerForm']/div[2]/table/tbody/tr/td/div/div/div/div
waitForElementPresent link=Question Test_ANS_21_003_Update
verifyElementPresent link=Question Test_ANS_21_003_Update
verifyElementPresent //td[1]/div/div[2]/div[2]/div/div[1]/div
click //td[1]/div/div[2]/div[2]/div/div[1]/div
waitForElementPresent link=Sign out
clickAndWait link=Sign out
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 //td[1]/div/div[2]/div[2]/div/div[1]/div
click //td[1]/div/div[2]/div[2]/div/div[1]/div
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_003
verifyTextNotPresent Test_ANS_21_003
waitForElementPresent link=Sign out
clickAndWait link=Sign out