| echo |
Step 1: Login |
|
| open |
/ksdemo/public/classic/ |
|
| windowMaximize |
|
|
| waitForElementPresent |
link=Sign in |
|
| click |
link=Sign in |
|
| waitForElementPresent |
username |
root |
| type |
username |
root |
| type |
password |
gtn |
| clickAndWait |
//a[@id='UIPortalLoginFormAction'] |
|
| echo |
Step 2: Add category |
|
| open |
/ksdemo/private/classic/answers |
|
| waitForElementPresent |
//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"] |
|
| click |
//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"] |
|
| waitForElementPresent |
//div[@id='FAQCategroManager']//a[text()='Add Category'] |
|
| clickAt |
//div[@id='FAQCategroManager']//a[text()='Add Category'] |
|
| waitForElementPresent |
eventCategoryName |
|
| type |
eventCategoryName |
Smoke_02_Category |
| waitForElementPresent |
//img[@title='Select a user '] |
|
| click |
//img[@title='Select a user '] |
|
| waitForElementPresent |
//input[@name='demo'] |
|
| click |
//input[@name='demo'] |
|
| waitForElementPresent |
//form[@id='UIUserSelector']//a[text()="Add"] |
|
| click |
//form[@id='UIUserSelector']//a[text()="Add"] |
|
| click |
ViewAuthorInfor |
|
| click |
moderateAnswers |
|
| type |
description |
SNF_KS_01 |
| waitForElementPresent |
link=Save |
|
| click |
link=Save |
|
| waitForElementPresent |
link=Smoke_02_Category |
|
| verifyElementPresent |
link=Smoke_02_Category |
|
| echo |
Step 3: Ask Question |
|
| waitForElementPresent |
link=Smoke_02_Category |
|
| click |
link=Smoke_02_Category |
|
| waitForElementPresent |
//div[@id='UIQuestions']//a[text()='Submit Question'] |
|
| click |
//div[@id='UIQuestions']//a[text()='Submit Question'] |
|
| waitForElementPresent |
QuestionTitle |
|
| type |
QuestionTitle |
Smoke_02_Question |
| 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 Smoke_02_Question |
| selectFrame |
relative=top |
|
| 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'] |
|
| waitForElementPresent |
link=Smoke_02_Question |
|
| verifyElementPresent |
link=Smoke_02_Question |
|
| echo |
step 4: Add answers |
|
| click |
link=Smoke_02_Question |
|
| 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 for Smoke_02 |
| selectFrame |
relative=top |
|
| waitForElementPresent |
link=Save |
|
| click |
link=Save |
|
| waitForTextPresent |
Answer for Smoke_02 |
|
| verifyTextPresent |
Answer for Smoke_02 |
|
| waitForElementPresent |
//div[@id='AnswersContainer']/div/div/div |
|
| click |
//div[@id='AnswersContainer']/div/div/div |
|
| echo |
-Check unapprove answer by normal user |
|
| waitForElementPresent |
link=Sign out |
|
| clickAndWait |
link=Sign out |
|
| 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 |
|
| waitForElementPresent |
link=Smoke_02_Category |
|
| click |
link=Smoke_02_Category |
|
| waitForElementPresent |
link=Smoke_02_Question |
|
| click |
link=Smoke_02_Question |
|
| waitForTextNotPresent |
Answer for Smoke_02 |
|
| verifyTextNotPresent |
Answer for Smoke_02 |
|
| waitForElementPresent |
//div[@id='AnswersContainer']/div/div/div |
|
| click |
//div[@id='AnswersContainer']/div/div/div |
|
| echo |
Step 5: Approve answer |
|
| waitForElementPresent |
link=Sign out |
|
| clickAndWait |
link=Sign out |
|
| 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=Smoke_02_Category |
|
| click |
link=Smoke_02_Category |
|
| waitForElementPresent |
link=Smoke_02_Question |
|
| click |
link=Smoke_02_Question |
|
| waitForElementPresent |
//div[@id='SetWidthContent']/div/div/table/tbody/tr/td[3]/a/div |
|
| click |
//div[@id='SetWidthContent']/div/div/table/tbody/tr/td[3]/a/div |
|
| waitForElementPresent |
//div[@id='SetWidthContent']/div/div/table/tbody/tr/td[3]/a/div[@class='ApprovedQuestion'] |
|
| verifyElementPresent |
//div[@id='SetWidthContent']/div/div/table/tbody/tr/td[3]/a/div[@class='ApprovedQuestion'] |
|
| echo |
Step 6: Comment for Question |
|
| waitForElementPresent |
//a[text()='Answer']/following::a[text()='Comment'] |
|
| click |
//a[text()='Answer']/following::a[text()='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 Smoke_02 |
| selectFrame |
relative=top |
|
| waitForElementPresent |
link=Save |
|
| click |
link=Save |
|
| waitForTextPresent |
Comment Smoke_02 |
|
| verifyTextPresent |
Comment Smoke_02 |
|
| echo |
-Delete Test data- |
|
| click |
//div[@onclick="eXo.faq.UIAnswersPortlet.viewTitle('FAQCategroManager');"] |
|
| waitForElementPresent |
link=Delete |
|
| clickAt |
link=Delete |
|
| assertConfirmation |
Are you sure you want to delete this category ? |
|
| waitForElementNotPresent |
link=Smoke_02_Category |
|
| verifyElementNotPresent |
link=Smoke_02_Category |
|
| echo |
Step 7: Logout |
|
| waitForElementPresent |
link=Sign out |
|
| clickAndWait |
link=Sign out |
|
| waitForElementPresent |
link=Sign in |
|