Test_SNF_KS_30_ksdemo_TagTopic
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_30
type Description Category 1
click link=Save
waitForTextPresent Cate1_SNF_KS_30
verifyTextPresent Cate1_SNF_KS_30
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_30
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_30
click link=Cate1_SNF_KS_30
waitForTextPresent For1_SNF_KS_30
verifyTextPresent For1_SNF_KS_30
echo -Add topic-
waitForElementPresent link=For1_SNF_KS_30
click link=For1_SNF_KS_30
waitForElementPresent link=Start topic
click link=Start topic
waitForElementPresent ThreadTitle
type ThreadTitle Top1_SNF_KS_30
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body topic1 for tag
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Top1_SNF_KS_30
verifyTextPresent Top1_SNF_KS_30
waitForElementPresent link=Start topic
click link=Start topic
waitForElementPresent ThreadTitle
type ThreadTitle Top2_SNF_KS_30
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Topic 2 for suggest tag
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Top2_SNF_KS_30
verifyTextPresent Top2_SNF_KS_30
echo --Add tag for topic
waitForElementPresent link=Top1_SNF_KS_30
click link=Top1_SNF_KS_30
waitForElementPresent link=Tag
click link=Tag
type AddTag toto titi tata
waitForElementPresent //div[2]/div/div/div/div/div[2]/div/div/div[2]/div/div/div/div/div
click //div[2]/div/div/div/div/div[2]/div/div/div[2]/div/div/div/div/div
waitForElementPresent link=toto
verifyElementPresent link=toto
verifyElementPresent link=titi
verifyElementPresent link=tata
echo -- Auto-Suggest tag
waitForElementPresent link=For1_SNF_KS_30
click link=For1_SNF_KS_30
waitForElementPresent link=Top2_SNF_KS_30
click link=Top2_SNF_KS_30
waitForElementPresent //div[@id='ButtonSearch']/div/div/div
click //div[@id='ButtonSearch']/div/div/div
waitForElementPresent AddTag
type AddTag t
waitForElementPresent AddTag t
keyDown AddTag t
waitForElementPresent //div[@id='AddTagId']/div/div/div/div/div[2]/div/div/div/div[@id='searchTagName']/div[3]
click //div[@id='AddTagId']/div/div/div/div/div[2]/div/div/div/div[@id='searchTagName']/div[3]
waitForElementPresent //div[2]/div/div/div/div/div[2]/div/div/div[2]/div/div/div/div/div
click //div[2]/div/div/div/div/div[2]/div/div/div[2]/div/div/div/div/div
waitForElementPresent link=toto
verifyElementPresent link=toto
echo -- View tag
waitForElementPresent link=toto
click link=toto
waitForTextPresent Top1_SNF_KS_30
verifyTextPresent Top1_SNF_KS_30
verifyTextPresent Top2_SNF_KS_30
echo -- Untag from Manage tag
waitForElementPresent //div[@id='UITopicContent']/div/table/tbody/tr/td[9]/input
click //div[@id='UITopicContent']/div/table/tbody/tr/td[9]/input
waitForElementPresent //form[@id='UITopicsTag']/div[2]/div[3]/div/div[1]/div/div/div/div[4]/div[1]/div/div/div/div
click //form[@id='UITopicsTag']/div[2]/div[3]/div/div[1]/div/div/div/div[4]/div[1]/div/div/div/div
waitForElementPresent link=Untag
click link=Untag
assertConfirmation Are you sure you want to remove this tag from the topic?
waitForTextNotPresent Top2_SNF_KS_30
verifyTextNotPresent Top2_SNF_KS_30
echo -- Untag by click on icon
waitForElementPresent link=Top1_SNF_KS_30
click link=Top1_SNF_KS_30
waitForElementPresent //form/div[2]/div[3]/div/div[1]/div[1]
click //form/div[2]/div[3]/div/div[1]/div[1]
echo --Check existing of tag in topic after untag
waitForTextNotPresent toto
verifyTextNotPresent toto
echo -- check existing of tag in Tag list after untag
waitForElementPresent //div[@id='ButtonSearch']/div/div/div
click //div[@id='ButtonSearch']/div/div/div
type AddTag t
keyDown AddTag t
waitForTextNotPresent toto
verifyTextNotPresent toto
echo -Delete Test Data
waitForElementPresent link=Cate1_SNF_KS_30
click link=Cate1_SNF_KS_30
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_30
verifyTextNotPresent Cate1_SNF_KS_30
waitForElementPresent link=Logout
clickAndWait link=Logout