Test_SNF_KS_07_ksdemo_BasicActionsInQuestion
open /portal/public/intranet/
windowMaximize
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div/a
open /portal/private/intranet/answers
echo -Add Category-
waitForElementPresent //div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
click //div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"]
waitForElementPresent link=Add category
clickAt link=Add category
waitForElementPresent eventCategoryName
type eventCategoryName SNF_KS_07
waitForElementPresent description
type description SNF_KS_07 des
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=SNF_KS_07
verifyElementPresent link=SNF_KS_07
echo -Add Question-
waitForElementPresent link=SNF_KS_07
click link=SNF_KS_07
waitForElementPresent link=Submit question
click link=Submit question
waitForElementPresent QuestionTitle
type QuestionTitle SNF_KS_07 in English
waitForElementPresent //iframe[@id='Question___Frame']
selectFrame //iframe[@id='Question___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body The detail of SNF_KS_07 in English
selectFrame relative=top
type EmailAddress root@localhost.vn
waitForElementPresent AllLanguages
select AllLanguages label=French
waitForElementPresent //option[@value='French']
click //option[@value='French']
type QuestionTitle SNF_KS_07 in French
waitForElementPresent //iframe[@id='Question___Frame']
selectFrame //iframe[@id='Question___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body The detail of SNF_KS_07 in French
selectFrame relative=top
waitForElementPresent link=Save
mouseDown link=Save
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
waitForElementPresent link=SNF_KS_07 in English
click link=SNF_KS_07 in English
waitForElementPresent link=French
click link=French
waitForTextPresent SNF_KS_07 in French
verifyTextPresent SNF_KS_07 in French
waitForTextPresent The detail of SNF_KS_07 in French
verifyTextPresent The detail of SNF_KS_07 in French
click link=English
waitForTextPresent SNF_KS_07 in English
verifyTextPresent SNF_KS_07 in English
waitForTextPresent The detail of SNF_KS_07 in English
verifyTextPresent The detail of SNF_KS_07 in English
echo -Edit Question-
waitForElementPresent //div[@class='DecoratorMC']//table[@class='DisablePrint']//td[3]/a
click //div[@class='DecoratorMC']//table[@class='DisablePrint']//td[3]/a
waitForElementPresent QuestionTitle SNF_KS_07 in English
type QuestionTitle SNF_KS_07 in English Update
waitForElementPresent //iframe[@id='Question___Frame']
selectFrame //iframe[@id='Question___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
waitForElementPresent //html/body The detail of SNF_KS_07 in English
type //html/body The detail of SNF_KS_07 in English Update
selectFrame relative=top
waitForElementPresent AllLanguages
select AllLanguages label=French
waitForElementPresent //option[@value='French']
click //option[@value='French']
waitForElementPresent QuestionTitle SNF_KS_07 in French
type QuestionTitle SNF_KS_07 in French Update
waitForElementPresent //iframe[@id='Question___Frame']
selectFrame //iframe[@id='Question___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
waitForElementPresent //html/body The detail of SNF_KS_07 in French
type //html/body The detail of SNF_KS_07 in French Update
selectFrame relative=top
waitForElementPresent link=Save
mouseDown link=Save
waitForTextPresent SNF_KS_07 in English
verifyTextPresent SNF_KS_07 in English
waitForTextPresent The detail of SNF_KS_07 in English Update
verifyTextPresent The detail of SNF_KS_07 in English Update
waitForElementPresent link=French
click link=French
waitForTextPresent SNF_KS_07 in French Update
verifyTextPresent SNF_KS_07 in French Update
waitForTextPresent The detail of SNF_KS_07 in French Update
verifyTextPresent The detail of SNF_KS_07 in French Update
echo -Move question-
waitForElementPresent //div[@class='DecoratorMC']//table[@class='DisablePrint']//td[5]/a
click //div[@class='DecoratorMC']//table[@class='DisablePrint']//td[5]/a
waitForElementPresent //form[@id='UIMoveQuestionForm']//div[@id='FAQCateRoot']/a
doubleClick //form[@id='UIMoveQuestionForm']//div[@id='FAQCateRoot']/a
waitForElementPresent //div[@id='UIBreadcumbs']//td//a[@class='Selected ControlButton']
click //div[@id='UIBreadcumbs']//td//a[@class='Selected ControlButton']
waitForTextPresent SNF_KS_07 in English Update
verifyTextPresent SNF_KS_07 in English Update
echo -Delete question-
waitForElementPresent link=SNF_KS_07 in English Update
click link=SNF_KS_07 in English Update
waitForElementPresent //div[@class='DecoratorMC']//table[@class='DisablePrint']//td[4]/a
click //div[@class='DecoratorMC']//table[@class='DisablePrint']//td[4]/a
waitForElementPresent //form[@id='UIDeleteQuestion']//table[@class='ActionContainer']//div
click //form[@id='UIDeleteQuestion']//table[@class='ActionContainer']//div
waitForTextNotPresent SNF_KS_07 in English Update
verifyTextNotPresent SNF_KS_07 in English Update
echo -Delete Test Data-
waitForElementPresent link=SNF_KS_07
contextMenu link=SNF_KS_07
waitForElementPresent link=Delete
clickAt link=Delete
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent SNF_KS_07
verifyTextNotPresent SNF_KS_07
waitForElementPresent link=Logout
clickAndWait link=Logout