Test_SNF_KS_07_ksdemo_BasicActionsInQuestion
open /ksdemo/public/classic/
windowMaximize
waitForElementPresent link=Sign in
click link=Sign in
waitForElementPresent username
type username root
type password gtn
echo -Login by Admin
clickAndWait //div[@id='UIPortalLoginFormAction']//a[text()="Sign in"]
open /ksdemo/private/classic/answers
echo -Category
waitForElementPresent link=Category
click link=Category
echo -Add Category-
waitForElementPresent link=Add category
clickAt link=Add category
waitForElementPresent eventCategoryName
type eventCategoryName SNF_KS_07
waitForElementPresent description
type description The discription for SNF_KS_07
waitForElementPresent link=Save
click link=Save
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 //a[@title="SNF_KS_07"]
mouseOver //a[@title="SNF_KS_07"]
contextMenu //a[@title="SNF_KS_07"]
waitForElementPresent //div[@id='UIFAQPopupCategories2']//a[@class="IconItem DeleteCategory"]
mouseDownRight //div[@id='UIFAQPopupCategories2']//a[@class="IconItem DeleteCategory"]
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent SNF_KS_07
verifyTextNotPresent SNF_KS_07
echo -Sign out
waitForElementPresent link=Sign out
clickAndWait link=Sign out