Test_SNF_KS_16_ksdemo_ManageCommentInQuestion
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 Category-
waitForElementPresent link=Category
click link=Category
waitForElementPresent link=Add category
clickAt link=Add category
waitForElementPresent eventCategoryName
type eventCategoryName SNF_KS_16
waitForElementPresent description
type description SNF_KS_16 des
waitForElementPresent link=Save
click link=Save
echo -Add Question -
waitForElementPresent link=SNF_KS_16
click link=SNF_KS_16
waitForElementPresent link=Submit question
click link=Submit question
waitForElementPresent QuestionTitle
type QuestionTitle SNF_KS_16 English
type EmailAddress root@localhost.vn
waitForElementPresent AllLanguages
select AllLanguages label=French
waitForElementPresent //option[@value='French']
click //option[@value='French']
waitForElementPresent QuestionTitle
type QuestionTitle SNF_KS_16 French
waitForElementPresent link=Save
mouseDown link=Save
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
echo -Comment Question-
waitForElementPresent link=SNF_KS_16 English
click link=SNF_KS_16 English
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='Comment']/a
click //div[@id='AnswersViewContent']//div[@class='Comment']/a
waitForElementPresent //iframe[@id='CommentContent___Frame']
selectFrame //iframe[@id='CommentContent___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Comment in English
selectFrame relative=top
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=French
click link=French
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='Comment']/a
click //div[@id='AnswersViewContent']//div[@class='Comment']/a
waitForElementPresent //iframe[@id='CommentContent___Frame']
selectFrame //iframe[@id='CommentContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Comment in French
selectFrame relative=top
waitForElementPresent //form[@id='UICommentForm']//a[text()="Save"]
click //form[@id='UICommentForm']//a[text()="Save"]
echo -Edit Comment-
waitForElementPresent link=English
click link=English
waitForTextPresent Comment in English
verifyTextPresent Comment in English
echo -Edit comment English
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Edit comment"]
click //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Edit comment"]
waitForElementPresent //iframe[@id='CommentContent___Frame']
selectFrame //iframe[@id='CommentContent___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Comment in English Update
selectFrame relative=top
waitForElementPresent link=Save
click link=Save
waitForTextPresent Comment in English Update
verifyTextPresent Comment in English Update
waitForElementPresent link=French
click link=French
echo -Edit comment French
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Edit comment"]
click //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Edit comment"]
waitForElementPresent //iframe[@id='CommentContent___Frame']
selectFrame //iframe[@id='CommentContent___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Comment in French Update
selectFrame relative=top
waitForElementPresent link=Save
click link=Save
waitForTextPresent Comment in French Update
verifyTextPresent Comment in French Update
echo -Delete Comment-
waitForElementPresent link=English
click link=English
waitForTextPresent Comment in English Update
verifyTextPresent Comment in English Update
echo -Delete comment French
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Delete comment"]
click //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Delete comment"]
assertConfirmation Are you sure you want to delete this comment ?
waitForTextNotPresent Comment in English Update
verifyTextNotPresent Comment in English Update
waitForElementPresent link=French
click link=French
echo -Delete comment French
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Delete comment"]
click //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Delete comment"]
assertConfirmation Are you sure you want to delete this comment ?
waitForTextNotPresent Comment in French Update
verifyTextNotPresent Comment in French Update
echo -Comment Question for Promote Test-
waitForElementPresent link=English
click link=English
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='Comment']/a
click //div[@id='AnswersViewContent']//div[@class='Comment']/a
waitForElementPresent //iframe[@id='CommentContent___Frame']
selectFrame //iframe[@id='CommentContent___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Comment in English
selectFrame relative=top
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=French
click link=French
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='Comment']/a
click //div[@id='AnswersViewContent']//div[@class='Comment']/a
waitForElementPresent //iframe[@id='CommentContent___Frame']
selectFrame //iframe[@id='CommentContent___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Comment in French
selectFrame relative=top
waitForElementPresent //form[@id='UICommentForm']//a[text()="Save"]
click //form[@id='UICommentForm']//a[text()="Save"]
echo -Promote Comment-
waitForElementPresent link=English
click link=English
waitForTextPresent Comment in English
verifyTextPresent Comment in English
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Promote as answer"]
click //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Promote as answer"]
waitForTextNotPresent No one has answered to that question.
verifyTextNotPresent No one has answered to that question.
click link=French
waitForTextPresent Comment in French
verifyTextPresent Comment in French
waitForElementPresent //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Promote as answer"]
click //div[@id='AnswersViewContent']//div[@class='ResponseItemContainer']//a[@title="Promote as answer"]
waitForTextNotPresent No one has answered to that question.
verifyTextNotPresent No one has answered to that question.
echo - Delete data-
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_16 English
verifyTextNotPresent SNF_KS_16 English
echo -Delete Category Test-
waitForElementPresent //div[@id='AnswersContainer']/div/div[1]/div
click //div[@id='AnswersContainer']/div/div[1]/div
waitForElementPresent //a[@title="SNF_KS_16"]
mouseOver //a[@title="SNF_KS_16"]
contextMenu //a[@title="SNF_KS_16"]
waitForElementPresent //div[@id='UIFAQPopupCategories2']/div/div/div/div/div[6]/a
mouseDownRight //div[@id='UIFAQPopupCategories2']/div/div/div/div/div[6]/a
assertConfirmation Are you sure you want to delete this category ?
waitForTextNotPresent SNF_KS_16
verifyTextNotPresent SNF_KS_16
waitForElementPresent link=Sign out
clickAndWait link=Sign out
waitForTextPresent Sign in