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 //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/answers
echo -Add Question for Answer-
waitForElementPresent //div[@id='UIQuestions']//a[text()='Submit Question']
click //div[@id='UIQuestions']//a[text()='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']
mouseOver //div[@id='UIPage']
waitForElementPresent //div[@id='UIPage']//a[@title='Edit Portlet']
click //div[@id='UIPage']//a[@title='Edit Portlet']
waitForElementPresent display-mode
select display-mode label=Approved
waitForElementPresent //form[@id='FAQPortletSetting']//a[text()='Save']
click //form[@id='FAQPortletSetting']//a[text()='Save']
waitForElementPresent //div[@id='UIPortalApplication']//a[text()='OK']
click //div[@id='UIPortalApplication']//a[text()='OK']
waitForElementPresent //div[@id='UIMaskWorkspace']//a[@id='Close']
click //div[@id='UIMaskWorkspace']//a[@id='Close']
echo - Save Portlet
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 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 //a[@id='UIPortalLoginFormAction']
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 //a[@id='UIPortalLoginFormAction']
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 //a[@id='UIPortalLoginFormAction']
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 //a[@id='UIPortalLoginFormAction']
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 //a[@id='UIPortalLoginFormAction']
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 //a[@id='UIPortalLoginFormAction']
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 //a[@id='UIPortalLoginFormAction']
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 //a[@id='UIPortalLoginFormAction']
open /ksdemo/private/classic/answers
waitForElementPresent link=Question for Answer
click link=Question for Answer
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
waitForElementPresent //div[@id='UIPage']
mouseOver //div[@id='UIPage']
waitForElementPresent //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']
waitForElementPresent //div[@id='UIPortalApplication']//a[text()='OK']
click //div[@id='UIPortalApplication']//a[text()='OK']
waitForElementPresent //div[@id='UIMaskWorkspace']//a[@id='Close']
click //div[@id='UIMaskWorkspace']//a[@id='Close']
echo - Save Portlet
waitForElementPresent //div[@id='UIPageEditor']//a[@title='Finish']
click //div[@id='UIPageEditor']//a[@title='Finish']
waitForElementPresent link=Sign out
clickAndWait link=Sign out
waitForTextPresent Sign in
verifyTextPresent Sign in