Test_SNF_KS_15_ksdemo_ActiveApproveAnswer
open /ksdemo/public/classic/
windowMaximize
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /ksdemo/private/classic/answers
echo -Add Question for Answer-
waitForTextPresent Submit question
click link=Submit question
waitForElementPresent QuestionTitle
type QuestionTitle Question for Answer
type EmailAddress root@localhost.vn
waitForElementPresent link=Save
mouseDown link=Save
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
echo -Answer Question-
waitForElementPresent link=Question for Answer
click link=Question for Answer
waitForElementPresent link=Answer
click link=Answer
waitForElementPresent //iframe[@id='QuestionRespone___Frame']
selectFrame //iframe[@id='QuestionRespone___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Answer 1
selectFrame relative=top
waitForElementPresent link=Save
click link=Save
echo -Change Approve Mode-
open /ksdemo/private/classic/answers
waitForElementPresent link=Edit Page
click link=Edit Page
waitForElementPresent //div[@id='UIPage']/div/div/div/div/div/div/div
mouseOver //div[@id='UIPage']/div/div/div/div/div/div/div
waitForElementPresent //div/div/div[2]/div/div/div/div/div/div/a[1]
click //div/div/div[2]/div/div/div/div/div/div/a[1]
waitForElementPresent display-mode
select display-mode label=Approved
click //form[@id='FAQPortletSetting']/div[3]/table/tbody/tr/td/div/div/div/div
waitForElementPresent UIAnswersPortlet
click //div[@id='UIAnswersPortlet']//div[@class='ExoMessageDecorator']//table[@class='ActionContainer']//div
waitForElementPresent //div[2]/table/tbody/tr/td/div[2]/div/div/div
click //div[2]/table/tbody/tr/td/div[2]/div/div/div
waitForElementPresent //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
click //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
echo -Disapprove Answer-
waitForElementPresent link=Question for Answer
click link=Question for Answer
waitForTextPresent Answer 1
verifyTextPresent Answer 1
waitForElementPresent AnswersViewContent
click //div[@id='AnswersViewContent']//div[@id='SetWidthContent']//table//td[3]/a
clickAndWait link=Sign out
echo -Check Disapprove Answer-
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username demo
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /ksdemo/private/classic/answers
waitForTextPresent Question for Answer
click link=Question for Answer
waitForTextNotPresent Answer 1
verifyTextNotPresent Answer 1
clickAndWait link=Sign out
waitForTextPresent Sign in
echo -Approve the disapproved answer-
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /ksdemo/private/classic/answers
waitForTextPresent Question for Answer
click link=Question for Answer
waitForElementPresent //div[@id='AnswersViewContent']//div[@id='SetWidthContent']//table//td[3]/a
click //div[@id='AnswersViewContent']//div[@id='SetWidthContent']//table//td[3]/a
clickAndWait link=Sign out
waitForTextPresent Sign in
echo -Check Approve Answer-
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username demo
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /ksdemo/private/classic/answers
waitForTextPresent Question for Answer
click link=Question for Answer
waitForTextPresent Answer 1
verifyTextPresent Answer 1
clickAndWait link=Sign out
waitForTextPresent Sign in
echo -Inactive Answer-
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /ksdemo/private/classic/answers
waitForTextPresent Question for Answer
click link=Question for Answer
waitForTextPresent Answer 1
verifyTextPresent Answer 1
waitForElementPresent //div[@id='AnswersViewContent']//div[@id='SetWidthContent']//table//td[4]/a
click //div[@id='AnswersViewContent']//div[@id='SetWidthContent']//table//td[4]/a
clickAndWait link=Sign out
waitForTextPresent Sign in
echo -Check Inactive Answer-
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username demo
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /ksdemo/private/classic/answers
waitForTextPresent Question for Answer
click link=Question for Answer
waitForTextNotPresent Answer 1
verifyTextNotPresent Answer 1
clickAndWait link=Sign out
waitForTextPresent Sign in
echo -Activate Inactive answer-
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /ksdemo/private/classic/answers
waitForTextPresent Question for Answer
click link=Question for Answer
waitForElementPresent //div[@id='AnswersViewContent']//div[@id='SetWidthContent']//table//td[4]/a
click //div[@id='AnswersViewContent']//div[@id='SetWidthContent']//table//td[4]/a
clickAndWait link=Sign out
waitForTextPresent Sign in
echo -Check Active Answer-
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username demo
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /ksdemo/private/classic/answers
waitForTextPresent Question for Answer
click link=Question for Answer
waitForTextPresent Answer 1
verifyTextPresent Answer 1
echo -Delete test data-
clickAndWait link=Sign out
waitForTextPresent Sign in
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /ksdemo/private/classic/answers
waitForElementPresent link=Question for Answer
click link=Question for Answer
click //div[@id='AnswersViewContent']/div/div/div[2]/div/div/div/table/tbody/tr/td[2]/table/tbody/tr/td/table/tbody/tr/td[4]/a/div[@class='Delete']
waitForElementPresent //form[@id='UIDeleteQuestion']/div[3]/table/tbody/tr/td/div/div/div/div[@class='ButtonMiddle']
click //form[@id='UIDeleteQuestion']/div[3]/table/tbody/tr/td/div/div/div/div[@class='ButtonMiddle']
waitForElementNotPresent link=Question for Answer
verifyElementNotPresent link=Question for Answer
echo -Reset to All Mode-
waitForElementPresent link=Edit Page
click link=Edit Page
waitForElementPresent //div[@id='UIPage']/div/div/div/div/div/div/div
mouseOver //div[@id='UIPage']/div/div/div/div/div/div/div
waitForElementPresent //div/div/div[2]/div/div/div/div/div/div/a[1]
click //div/div/div[2]/div/div/div/div/div/div/a[1]
waitForElementPresent display-mode
select display-mode label=All
click //form[@id='FAQPortletSetting']/div[3]/table/tbody/tr/td/div/div/div/div
waitForElementPresent UIAnswersPortlet
click //div[@id='UIAnswersPortlet']//div[@class='ExoMessageDecorator']//table[@class='ActionContainer']//div
waitForElementPresent //div[2]/table/tbody/tr/td/div[2]/div/div/div
click //div[2]/table/tbody/tr/td/div[2]/div/div/div
waitForElementPresent //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
click //div[@id='UIPageEditor']/div[1]/div/div/div/a[2]
waitForElementPresent link=Sign out
clickAndWait link=Sign out