Test_SNF_KS_31_ksdemo_RateTopic
open /portal/public/intranet/
windowMaximize
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
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_31
type Description Category 1
click link=Save
waitForTextPresent Cate1_SNF_KS_31
verifyTextPresent Cate1_SNF_KS_31
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_31
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_31
click link=Cate1_SNF_KS_31
waitForTextPresent For1_SNF_KS_31
verifyTextPresent For1_SNF_KS_31
echo -Add topic for rate-
waitForElementPresent link=For1_SNF_KS_31
click link=For1_SNF_KS_31
waitForElementPresent //form[@id='UITopicContainer']//div[@class='ItemIcon PostnewThreadIcon']/a
click //form[@id='UITopicContainer']//div[@class='ItemIcon PostnewThreadIcon']/a
waitForElementPresent ThreadTitle
type ThreadTitle Top1_SNF_KS_31
pause 1000
selectFrame //iframe[@id='messageContent___Frame']
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Topic for Rate
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Top1_SNF_KS_31
verifyTextPresent Top1_SNF_KS_31
echo -Rate Topic-
waitForElementPresent link=Top1_SNF_KS_31
click link=Top1_SNF_KS_31
waitForElementPresent //form[@id='UITopicDetail']/div[4]/div[1]//div[8]/div/div/div/div/div/div
click //form[@id='UITopicDetail']/div[4]/div[1]//div[8]/div/div/div/div/div/div
waitForElementPresent //div[@class='VoteFormContainer']
click //form/div[2]/div/div[1]/div/div[5]
waitForElementPresent link=For1_SNF_KS_31
click link=For1_SNF_KS_31
waitForElementPresent //div[@title='Rated 5/5.']
verifyElementPresent //div[@title='Rated 5/5.']
echo -Rate again-
waitForElementPresent link=Top1_SNF_KS_31
click link=Top1_SNF_KS_31
waitForElementPresent link=Rate
click link=Rate
waitForTextPresent According to our records root has already rated this topic.
verifyTextPresent According to our records root has already rated this topic.
waitForElementPresent //div[@id='UIForumPortlet']//a[text()='OK']
click //div[@id='UIForumPortlet']//a[text()='OK']
echo -More check on Rate-
waitForElementPresent link=Logout
click link=Logout
open /portal/public/intranet/
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username demo
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
open /portal/private/intranet/forum
waitForElementPresent link=For1_SNF_KS_31
click link=For1_SNF_KS_31
waitForElementPresent //div[@title='Rated 5/5.']
verifyElementPresent //div[@title='Rated 5/5.']
waitForElementPresent link=Top1_SNF_KS_31
click link=Top1_SNF_KS_31
waitForElementPresent link=Rate
click link=Rate
waitForElementPresent //div[@class='VoteFormContainer']
click //form/div[2]/div/div[1]/div/div[3]
waitForElementPresent link=For1_SNF_KS_31
click link=For1_SNF_KS_31
waitForElementPresent //div[@title='Rated 4/5.']
verifyElementPresent //div[@title='Rated 4/5.']
echo -Delete test data-
waitForElementPresent link=Logout
click link=Logout
open /portal/public/intranet/
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']/div/div/div[@class='ButtonMiddle']/a
pause 1000
open /portal/private/intranet/forum
waitForElementPresent link=Cate1_SNF_KS_31
click link=Cate1_SNF_KS_31
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_31
verifyTextNotPresent Cate1_SNF_KS_31
waitForElementPresent link=Logout
clickAndWait link=Logout
waitForTextPresent Sign in