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
echo -Login
clickAndWait //div[@id='UIPortalLoginFormAction']//a[text()="Sign in"]
echo -Answer
open /ksdemo/private/classic/answers
echo -Add Question for Answer-
waitForElementPresent link=Submit question
click link=Submit question
waitForElementPresent QuestionTitle
type QuestionTitle Question for Answer
type EmailAddress root@localhost.vn
echo -Save
waitForElementPresent link=Save
mouseDown link=Save
echo -OK
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
echo -Save
waitForElementPresent link=Save
click link=Save
echo -Change Approve Mode: go to Answer
open /ksdemo/private/classic/answers
echo -Edit Page
waitForElementPresent link=Edit Page
click link=Edit Page
pause 3000
waitForElementPresent //div[@id='UIPage']//a[@title="Edit Portlet"]
mouseOver //div[@id='UIPage']//a[@title="Edit Portlet"]
click //div[@id='UIPage']//a[@title="Edit Portlet"]
waitForElementPresent display-mode
select display-mode label=Approved
echo -Save
waitForElementPresent //form[@id='FAQPortletSetting']//a[text()="Save"]
click //form[@id='FAQPortletSetting']//a[text()="Save"]
echo -OK
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()="OK"]
click //div[@id='UIAnswersPortlet']//a[text()="OK"]
echo -Close
waitForElementPresent Close
click Close
echo -Finish to Edit pages
waitForElementPresent //div[@id='UIPageEditor']//a[@title="Finish"]
click //div[@id='UIPageEditor']//a[@title="Finish"]
echo -Disapprove Answer-
waitForElementPresent link=Question for Answer
click link=Question for Answer
waitForTextPresent Answer 1
verifyTextPresent Answer 1
waitForElementPresent //div[@id='AnswersViewContent']//a[@title="Disapprove"]
click //div[@id='AnswersViewContent']//a[@title="Disapprove"]
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']//a[text()="Sign in"]
open /ksdemo/private/classic/answers
waitForElementPresent link=Question for Answer
click link=Question for Answer
waitForTextNotPresent Answer 1
verifyTextNotPresent Answer 1
clickAndWait link=Sign out
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']//a[text()="Sign in"]
open /ksdemo/private/classic/answers
waitForElementPresent link=Question for Answer
click link=Question for Answer
waitForElementPresent //div[@id='AnswersViewContent']//a[@title="Approve"]
click //div[@id='AnswersViewContent']//a[@title="Approve"]
clickAndWait link=Sign out
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']//a[text()="Sign in"]
open /ksdemo/private/classic/answers
waitForElementPresent link=Question for Answer
click link=Question for Answer
waitForTextPresent Answer 1
verifyTextPresent Answer 1
clickAndWait link=Sign out
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']//a[text()="Sign in"]
open /ksdemo/private/classic/answers
waitForElementPresent link=Question for Answer
click link=Question for Answer
waitForTextPresent Answer 1
verifyTextPresent Answer 1
echo -Inactivate
waitForElementPresent //div[@id='AnswersViewContent']//a[@title="Inactivate"]
click //div[@id='AnswersViewContent']//a[@title="Inactivate"]
clickAndWait link=Sign out
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']//a[text()="Sign in"]
open /ksdemo/private/classic/answers
waitForElementPresent link=Question for Answer
click link=Question for Answer
waitForTextNotPresent Answer 1
verifyTextNotPresent Answer 1
clickAndWait link=Sign out
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']//a[text()="Sign in"]
open /ksdemo/private/classic/answers
waitForElementPresent link=Question for Answer
click link=Question for Answer
waitForElementPresent //div[@id='AnswersViewContent']//a[@title="Activate"]
click //div[@id='AnswersViewContent']//a[@title="Activate"]
clickAndWait link=Sign out
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']//a[text()="Sign in"]
open /ksdemo/private/classic/answers
waitForElementPresent link=Question for Answer
click link=Question for Answer
waitForTextPresent Answer 1
verifyTextPresent Answer 1
echo -Delete test data-
clickAndWait link=Sign out
open /ksdemo/public/classic/
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']//a[text()="Sign in"]
open /ksdemo/private/classic/answers
waitForElementPresent link=Question for Answer
click link=Question for Answer
waitForElementPresent //div[@id='AnswersViewContent']//a[@title="Delete"]
click //div[@id='AnswersViewContent']//a[@title="Delete"]
waitForElementPresent //form[@id='UIDeleteQuestion']//a[text()="OK"]
click //form[@id='UIDeleteQuestion']//a[text()="OK"]
waitForElementNotPresent link=Question for Answer
verifyElementNotPresent link=Question for Answer
echo -Reset to All Mode-
waitForElementPresent link=Edit Page
click link=Edit Page
pause 1000
waitForElementPresent //div[@id='UIPage']//a[@title="Edit Portlet"]
mouseOver //div[@id='UIPage']//a[@title="Edit Portlet"]
click //div[@id='UIPage']//a[@title="Edit Portlet"]
waitForElementPresent display-mode
select display-mode label=All
waitForElementPresent //form[@id='FAQPortletSetting']//a[text()="Save"]
click //form[@id='FAQPortletSetting']//a[text()="Save"]
echo -OK
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()="OK"]
click //div[@id='UIAnswersPortlet']//a[text()="OK"]
echo -Close
waitForElementPresent Close
click Close
echo -Finish to Edit pages
waitForElementPresent //div[@id='UIPageEditor']//a[@title="Finish"]
click //div[@id='UIPageEditor']//a[@title="Finish"]
echo -Sign out
waitForElementPresent link=Sign out
clickAndWait link=Sign out