Test_SNF_KS_37_defaultportal_AdvanceSearchInForum
open /portal/public/intranet/
windowMaximize
waitForElementPresent //div[2]/div[2]/div[1]/div/div/div[1]
click //div[2]/div[2]/div[1]/div/div/div[1]
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
echo -Add category-
open /portal/private/intranet/forum
waitForElementPresent //a/span
click //a/span
waitForElementPresent CategoryTitle
type CategoryTitle Category 1
type Description Every one can see
waitForElementPresent link=Save
click link=Save
waitForElementPresent //div[2]/div/div/div/div[1]/a
click //div[2]/div/div/div/div[1]/a
waitForTextPresent Category 1
verifyTextPresent Category 1
echo -Add forum-
click link=Category 1
waitForElementPresent //div[3]/div/div/div/div/a/span
click //div[3]/div/div/div/div/a/span
waitForElementPresent ForumTitle
type ForumTitle For 1
type Description For 1
waitForElementPresent //form[@id='UIForumForm']/div[4]/table//div[1]/div/div/div
click //form[@id='UIForumForm']/div[4]/table//div[1]/div/div/div
waitForElementPresent link=Category 1
click link=Category 1
verifyTextPresent For 1
verifyTextPresent For 1
echo -Add topic-
click link=For 1
waitForElementPresent link=Start topic
click link=Start topic
waitForElementPresent ThreadTitle
type ThreadTitle Topic test
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Topic test
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Topic test
verifyTextPresent Topic test
echo -Add Quick Post reply-
click link=Topic test
waitForElementPresent Message
type Message Post Test
waitForElementPresent link=Quick reply
click link=Quick reply
waitForTextPresent Post Test
verifyTextPresent Post Test
echo -Search Category-
waitForElementPresent //form[@id='QuickSearchForm']/div[2]/a[1]
click //form[@id='QuickSearchForm']/div[2]/a[1]
waitForElementPresent SearchValue
type SearchValue Category 1
type SearchUser root
waitForElementPresent link=Search
click link=Search
waitForTextPresent Category 1
verifyTextPresent Category 1
echo -Search Forum-
waitForElementPresent //form[@id='QuickSearchForm']/div[2]/a[1]
click //form[@id='QuickSearchForm']/div[2]/a[1]
waitForElementPresent SearchValue
type SearchValue For
select SearchType label=Forum
waitForElementPresent //option[@value='forum']
click //option[@value='forum']
click IsOpen
waitForElementPresent link=Search
click link=Search
waitForTextPresent For 1
verifyTextPresent For 1
echo -SearchTopics-
waitForElementPresent //form[@id='QuickSearchForm']/div[2]/a[1]
click //form[@id='QuickSearchForm']/div[2]/a[1]
waitForElementPresent SearchValue
type SearchValue test
select SearchType label=Topic
waitForElementPresent //option[@value='topic']
click //option[@value='topic']
waitForElementPresent link=Search
click link=Search
waitForTextPresent Topic test
verifyTextPresent Topic test
echo -Search Posts-
waitForElementPresent //form[@id='QuickSearchForm']/div[2]/a[1]
click //form[@id='QuickSearchForm']/div[2]/a[1]
select SearchType label=Post
waitForElementPresent //option[@value='post']
click //option[@value='post']
waitForElementPresent link=Search
click link=Search
waitForTextPresent Re: Topic test
verifyTextPresent Re: Topic test
echo -Delete test data-
waitForElementPresent //div[2]/div/div/div/div[1]/a
click //div[2]/div/div/div/div[1]/a
waitForElementPresent link=Category 1
click link=Category 1
waitForElementPresent //form[@id='UICategory']/div[3]/div/div/div/div[4]/div[1]/div/div/div/div/div
click //form[@id='UICategory']/div[3]/div/div/div/div[4]/div[1]/div/div/div/div/div
waitForElementPresent link=Delete
click link=Delete
assertConfirmation Are you sure you want to delete this category?
waitForTextNotPresent Category 1
verifyTextNotPresent Category 1
clickAndWait link=Logout