Test_SNF_KS_54_ksdemo_BrowseCategorySubCategory
echo --View default category/sub-category/Question
windowMaximize
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/faq
waitForElementPresent link=How do I install KS ?
click link=How do I install KS ?
waitForElementPresent link=Forum Troubleshooting
click link=Forum Troubleshooting
waitForElementPresent //div[@id='UIViewer']//a[@title='Technical FAQ']
click //div[@id='UIViewer']//a[@title='Technical FAQ']
waitForElementPresent //div[@id='UIViewer']//img[@alt='categories']
clickAndWait //div[@id='UIViewer']//img[@alt='categories']
echo --Add new Category
open /ksdemo/private/classic/answers
waitForElementPresent link=Category
click link=Category
waitForElementPresent //div[@id='FAQCategroManager']//a[text()='Add Category']
clickAt //div[@id='FAQCategroManager']//a[text()='Add Category']
waitForElementPresent eventCategoryName
type eventCategoryName Parent_SNF_KS_54
waitForElementPresent link=Save
click link=Save
echo --Add new question
waitForElementPresent link=Parent_SNF_KS_54
click link=Parent_SNF_KS_54
waitForElementPresent //div[@id='UIQuestions']//a[text()='Submit Question']
click //div[@id='UIQuestions']//a[text()='Submit Question']
waitForElementPresent QuestionTitle
type QuestionTitle Parent question
waitForElementPresent //iframe[@id='Question___Frame']
selectFrame //iframe[@id='Question___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body What is open question
selectFrame relative=top
type EmailAddress root@localhost.com
waitForElementPresent //form[@id='UIQuestionForm']//a[text()='Save']
click //form[@id='UIQuestionForm']//a[text()='Save']
mouseDown link=Save
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
echo --Add new sub-category and Questions inside
waitForElementPresent link=Category
click link=Category
waitForElementPresent //div[@id='FAQCategroManager']//a[text()='Add Category']
clickAt //div[@id='FAQCategroManager']//a[text()='Add Category']
type eventCategoryName Sub1_SNF_KS_54
waitForElementPresent link=Save
click link=Save
waitForTextPresent Sub1_SNF_KS_54
verifyTextPresent Sub1_SNF_KS_54
waitForElementPresent link=Category
click link=Category
waitForElementPresent //div[@id='FAQCategroManager']//a[text()='Add Category']
clickAt //div[@id='FAQCategroManager']//a[text()='Add Category']
type eventCategoryName Sub2_SNF_KS_54
waitForElementPresent link=Save
click link=Save
waitForTextPresent Sub2_SNF_KS_54
verifyTextPresent Sub2_SNF_KS_54
echo --Add question for sub-category 1
waitForElementPresent link=Sub1_SNF_KS_54
click link=Sub1_SNF_KS_54
waitForElementPresent //div[@id='UIQuestions']//a[text()='Submit Question']
click //div[@id='UIQuestions']//a[text()='Submit Question']
waitForElementPresent QuestionTitle
type QuestionTitle Sub-question 1
waitForElementPresent //iframe[@id='Question___Frame']
selectFrame //iframe[@id='Question___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body what is pending question
selectFrame relative=top
type EmailAddress root@localhost.com
waitForElementPresent //form[@id='UIQuestionForm']//a[text()='Save']
clickAt //form[@id='UIQuestionForm']//a[text()='Save']
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
echo --Add question for subcategory 2
waitForElementPresent link=Parent_SNF_KS_54
click link=Parent_SNF_KS_54
waitForElementPresent link=Sub2_SNF_KS_54
click link=Sub2_SNF_KS_54
waitForElementPresent //div[@id='UIQuestions']//a[text()='Submit Question']
click //div[@id='UIQuestions']//a[text()='Submit Question']
waitForElementPresent QuestionTitle
type QuestionTitle Sub-question 2
waitForElementPresent //iframe[@id='Question___Frame']
selectFrame //iframe[@id='Question___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body what is answer
selectFrame relative=top
type EmailAddress root@localhost.com
waitForElementPresent //form[@id='UIQuestionForm']//a[text()='Save']
clickAt //form[@id='UIQuestionForm']//a[text()='Save']
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
echo --Browse added Category/Sub-Category
open /ksdemo/private/classic/faq
echo - Settings display Category/Question in FAQ -
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']
echo - Choose Category for displaying
waitForElementPresent //div[contains(text(),'Parent_SNF_KS_54')]/preceding-sibling::div/input
clickAt //div[contains(text(),'Parent_SNF_KS_54')]/preceding-sibling::div/input 1,1
echo - Save setting -
waitForElementPresent //a[contains(text(),'Save')]
click //a[contains(text(),'Save')]
echo - Close setting -
waitForElementPresent //div[@id='UIMaskWorkspace']//a[@id='Close']
click //div[@id='UIMaskWorkspace']//a[@id='Close']
echo - Save Setting Portlet
waitForElementPresent //div[@id='UIPageEditor']//a[@title='Finish']
click //div[@id='UIPageEditor']//a[@title='Finish']
echo - Check displaying of selected category
waitForTextPresent Parent question
verifyTextPresent Parent question
waitForElementPresent link=Sub1_SNF_KS_54
click link=Sub1_SNF_KS_54
waitForTextPresent Sub-question 1
verifyTextPresent Sub-question 1
waitForElementPresent //img[@alt='categories']
click //img[@alt='categories']
waitForElementPresent link=Sub2_SNF_KS_54
click link=Sub2_SNF_KS_54
waitForTextPresent Sub-question 2
verifyTextPresent Sub-question 2
echo --Delete add categories
open /ksdemo/private/classic/answers
waitForElementPresent //div[@id='UIBreadcumbs']//a[contains(text(),'Parent_SNF_KS_54')]
click //div[@id='UIBreadcumbs']//a[contains(text(),'Parent_SNF_KS_54')]
waitForElementPresent link=Category
click link=Category
waitForElementPresent //div[@id='FAQCategroManager']//a[text()='Delete']
clickAt //div[@id='FAQCategroManager']//a[text()='Delete'] 1,1
waitForElementNotPresent link=Parent_SNF_KS_54
verifyElementNotPresent link=Parent_SNF_KS_54
verifyConfirmation Are you sure to delete this category?
echo --View FAQ after delete categories
open /ksdemo/private/classic/faq
waitForTextNotPresent FAQCategory does not exist. Click here to go back to Home.
verifyTextNotPresent FAQCategory does not exist. Click here to go back to Home.
waitForElementPresent //div[@id='UIFAQPortlet']//a[contains(text(),'Category does not exist. Click here to go back to Home.')]
click //div[@id='UIFAQPortlet']//a[contains(text(),'Category does not exist. Click here to go back to Home.')]
waitForTextNotPresent link=Parent_SNF_KS_54
verifyTextNotPresent link=Parent_SNF_KS_54
clickAndWait link=Sign out
waitForTextPresent Sign in