Test_ANS_21_004
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_004
type description Edit Question in Pending questions tab of Manage questions form
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_004
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
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: Show Pending question tab of [Manage questions] main screen
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
waitForValue QuestionTitle Question Test_ANS_21_003
verifyValue 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
verifyText //html/body người về trong thương nhớ. người đi nhớ thương người
echo Step 4: Update information in fields
waitForElementPresent css=td[class='FieldLabel']
type QuestionTitle Question Test_ANS_21_003 Update
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 Tình yêu tưởng trừng như mãi mãi, nay bỗng nhiên bẽ bàng.
selectFrame relative=top
type EmailAddress root@localhost.com
waitForElementPresent IsApproved
verifyChecked IsApproved
verifyChecked IsActivated
click IsApproved
click IsActivated
waitForElementPresent link=Save
clickAt link=Save 1,1
waitForText //td[3]/div/div No
verifyText //td[3]/div/div No
click //td[3]/div/div No
waitForText //td[4]/div/div No
verifyText //td[4]/div/div No
click //td[4]/div/div No
waitForElementPresent //form[@id='UIQuestionManagerForm']/div[2]/table/tbody/tr/td/div/div/div/div/a
click //form[@id='UIQuestionManagerForm']/div[2]/table/tbody/tr/td/div/div/div/div/a
echo Check update information
waitForElementPresent link=Question Test_ANS_21_003 Update
clickAt link=Question Test_ANS_21_003 Update 1,1
waitForText css=span[class='QuestionName'] Question Test_ANS_21_003 Update
verifyText css=span[class='QuestionName'] Question Test_ANS_21_003 Update
verifyText css=div[class='UIDetailContainer'] p Tình yêu tưởng trừng như mãi mãi, nay bỗng nhiên bẽ bàng.
echo ========detele data
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_002
verifyTextNotPresent Test_ANS_21_002
waitForElementPresent link=Sign out
clickAndWait link=Sign out