Test_ANS_11_01_001
open /ksdemo/public/classic/
windowMaximize
echo Step 1: Show Add new category form
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_11_01_001
type description Answer question with valid entry
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_01_11
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 //*[@id="Question___Frame"]         //html/body/table/tbody/tr[2]/td/iframe
selectFrame relative=top
type EmailAddress demo@localhost.com
waitForElementPresent link=Save
clickAt link=Save 1,1
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 Answer question form
waitForElementPresent //div[3]/div/div[1]/div[1]/div[2]/a
contextMenu //div[3]/div/div[1]/div[1]/div[2]/a
waitForElementPresent link=Answer question
click link=Answer question
waitForElementPresent //*[@id="QuestionRespone___Frame"] 3000
selectFrame //*[@id="QuestionRespone___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 //*[@id="Question___Frame"]         //html/body/table/tbody/tr[2]/td/iframe
selectFrame relative=top
waitForElementPresent link=Save
clickAt link=Save 1,1
echo ---- Select language -----
waitForElementPresent link=Question Test_ANS_01_11
contextMenu link=Question Test_ANS_01_11
click //div[@id='UIPopupQuestion0']/div/div/div/div/div[3]/a
waitForSelectedValue AllLanguages English
select AllLanguages label=French
click //option[@value='French']
waitForElementPresent QuestionTitle
type QuestionTitle Question Test_ANS_01_11 With French
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 //*[@id="Question___Frame"]         //html/body/table/tbody/tr[2]/td/iframe
selectFrame relative=top
type EmailAddress demo@localhost.com
waitForElementPresent link=Save
clickAt link=Save 1,1
waitForElementPresent link=Question Test_ANS_01_11
click link=Question Test_ANS_01_11
waitForElementPresent link=French
click link=French
waitForElementPresent link=Answer
click link=Answer
waitForElementPresent //*[@id="QuestionRespone___Frame"]
selectFrame //*[@id="QuestionRespone___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 //*[@id="QuestionRespone___Frame"]   //html/body/table/tbody/tr[2]/td/iframe Change language
selectFrame relative=top
waitForElementPresent link=Save
clickAt link=Save 1,1
echo ==Login Demo
waitForElementPresent link=Sign out
clickAndWait link=Sign out
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username demo
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 //div[6]/div/a/span
click //div[6]/div/a/span
waitForElementPresent link=Question Test_ANS_01_11
click link=Question Test_ANS_01_11
waitForText css=span[class='QuestionName'] Question Test_ANS_01_11
verifyText css=span[class='QuestionName'] Question Test_ANS_01_11
verifyText //div[1]/p //*[@id="Question___Frame"] //html/body/table/tbody/tr[2]/td/iframe
waitForElementPresent link=French
click link=French
waitForText css=span[class='QuestionName'] Question Test_ANS_01_11 With French
verifyText css=span[class='QuestionName'] Question Test_ANS_01_11 With French
verifyText //div[1]/p //*[@id="QuestionRespone___Frame"] //html/body/table/tbody/tr[2]/td/iframe Change language
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 //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_11_01_001
verifyTextNotPresent Test_ANS_11_01_001
clickAndWait link=Sign out
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
waitForTextNotPresent Test_ANS_11_01_001
verifyTextNotPresent Test_ANS_11_01_001