Test_SNF_KS_28_ksdemo_BasicActionsInTopic
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
open /portal/private/intranet/forum
echo -Add Category for Test-
waitForElementPresent //a/span
click //a/span
waitForElementPresent CategoryTitle
type CategoryTitle Cate1_SNF_KS_28
type Description Category 1
click link=Save
waitForTextPresent Cate1_SNF_KS_28
verifyTextPresent Cate1_SNF_KS_28
echo -Add Forum-
waitForElementPresent //div[3]/div/div/div/div/a/span
click //div[3]/div/div/div/div/a/span
waitForElementPresent ForumTitle
type ForumTitle For1_SNF_KS_28
type Description prepare forum data
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=Cate1_SNF_KS_28
click link=Cate1_SNF_KS_28
waitForTextPresent For1_SNF_KS_28
verifyTextPresent For1_SNF_KS_28
echo -Add Topic for topic actions test-
waitForElementPresent link=For1_SNF_KS_28
click link=For1_SNF_KS_28
waitForElementPresent UITopicContainer
click //form[@id='UITopicContainer']//div[@class='ItemIcon PostnewThreadIcon']/a
waitForElementPresent ThreadTitle
type ThreadTitle Top1_SNF_KS_28
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Top1_SNF_KS_28_Content
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Top1_SNF_KS_28
verifyTextPresent Top1_SNF_KS_28
echo -Edit Topic-
click link=Top1_SNF_KS_28
waitForElementPresent //form[@id='UITopicDetail']/div[4]/div[1]//div[5]/div[1]/div/div/div/div/div
click //form[@id='UITopicDetail']/div[4]/div[1]//div[5]/div[1]/div/div/div/div/div
waitForElementPresent link=Edit
click link=Edit
waitForElementPresent ThreadTitle Top1_SNF_KS_28
verifyValue ThreadTitle Top1_SNF_KS_28
type ThreadTitle Top1_SNF_KS_28_Update
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Top1_SNF_KS_28_Content_Update
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Top1_SNF_KS_28_Update
verifyTextPresent Top1_SNF_KS_28_Update
echo -Create Forum For Move Topic
waitForElementPresent link=Cate1_SNF_KS_28
click link=Cate1_SNF_KS_28
pause 5000
click //div[@id='AddForum']/div/div/div/div/a/span
waitForElementPresent ForumTitle
type ForumTitle For2_SNF_KS_28
type Description Destination Forum
waitForElementPresent link=Save
click link=Save
waitForElementPresent link=Cate1_SNF_KS_28
click link=Cate1_SNF_KS_28
waitForTextPresent For2_SNF_KS_28
verifyTextPresent For2_SNF_KS_28
echo -Move Topic-
waitForElementPresent link=For1_SNF_KS_28
click link=For1_SNF_KS_28
pause 3000
click link=Top1_SNF_KS_28_Update
waitForElementPresent //form[@id='UITopicDetail']/div[4]/div[1]//div[5]/div[1]/div/div/div/div/div
click //form[@id='UITopicDetail']/div[4]/div[1]//div[5]/div[1]/div/div/div/div/div
waitForElementPresent //form[@id='UITopicDetail']//div[@class='ToolbarActionsContainer']/div[5]//div[@class='UIContextMenuContainer']//div[2]//div[11]
click //form[@id='UITopicDetail']//div[@class='ToolbarActionsContainer']/div[5]//div[@class='UIContextMenuContainer']//div[2]//div[11]
waitForElementPresent link=For2_SNF_KS_28
click link=For2_SNF_KS_28
pause 2000
click link=For2_SNF_KS_28
waitForTextPresent Top1_SNF_KS_28_Update
verifyTextPresent Top1_SNF_KS_28_Update
echo -Delete Topic-
click link=Top1_SNF_KS_28_Update
waitForElementPresent //form[@id='UITopicDetail']/div[4]/div[1]//div[5]/div[1]/div/div/div/div/div
click //form[@id='UITopicDetail']/div[4]/div[1]//div[5]/div[1]/div/div/div/div/div
waitForElementPresent //form[@id='UITopicDetail']//div[@class='ToolbarActionsContainer']/div[5]//div[@class='UIContextMenuContainer']//div[2]//div[12]
click //form[@id='UITopicDetail']//div[@class='ToolbarActionsContainer']/div[5]//div[@class='UIContextMenuContainer']//div[2]//div[12]
assertConfirmation Are you sure you want to delete this topic?
waitForTextPresent This forum is empty.
verifyTextPresent This forum is empty.
echo -Delete Test Data-
waitForElementPresent link=Cate1_SNF_KS_28
click link=Cate1_SNF_KS_28
waitForElementPresent //form[@id='UICategory']//div[@class='ManageCategoryButton']
click //form[@id='UICategory']//div[@class='ManageCategoryButton']
waitForElementPresent link=Delete
click link=Delete
assertConfirmation Are you sure you want to delete this category?
waitForTextNotPresent Cate1_SNF_KS_28
verifyTextNotPresent Cate1_SNF_KS_28
clickAndWait link=Logout