Test_SNF_KS_32_ksdemo_ManagePoll
open /portal/public/intranet/
windowMaximize
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username root
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /portal/private/intranet/forum
echo -Add Category for Test-
waitForElementPresent link=Add Category
click link=Add Category
waitForElementPresent CategoryTitle
type CategoryTitle Cate1_SNF_KS_32
type Description Category 1
click link=Save
waitForTextPresent Cate1_SNF_KS_32
verifyTextPresent Cate1_SNF_KS_32
echo -Add Forum-
waitForElementPresent //a[contains(text(),'Add Forum')]
click //a[contains(text(),'Add Forum')]
waitForElementPresent ForumTitle
type ForumTitle For1_SNF_KS_32
type Description prepare forum data
waitForElementPresent //form[@id='UIForumForm']//a[text()='Save']
click //form[@id='UIForumForm']//a[text()='Save']
waitForElementPresent link=Cate1_SNF_KS_32
click link=Cate1_SNF_KS_32
waitForTextPresent For1_SNF_KS_32
verifyTextPresent For1_SNF_KS_32
echo -Add Topic for topic actions test-
waitForElementPresent link=For1_SNF_KS_32
click link=For1_SNF_KS_32
waitForElementPresent //a[contains(text(),'Start Topic')]
click //a[contains(text(),'Start Topic')]
waitForElementPresent ThreadTitle
type ThreadTitle Top1_SNF_KS_32
waitForElementPresent //iframe[@id='messageContent___Frame']
selectFrame //iframe[@id='messageContent___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body Topic for Actions Test
selectFrame relative=top
waitForElementPresent link=Submit
click link=Submit
waitForTextPresent Top1_SNF_KS_32
verifyTextPresent Top1_SNF_KS_32
echo -Add Poll to Topic-
waitForElementPresent link=Top1_SNF_KS_32
click link=Top1_SNF_KS_32
waitForElementPresent //form[@id='UITopicDetail']//a[text()='More Actions']
click //form[@id='UITopicDetail']//a[text()='More Actions']
waitForElementPresent link=Add Poll
click link=Add Poll
waitForElementPresent Question
type Question About the topic content
type Option0 Good
type Option1 Normal
click //img[@title='Add Item']
waitForElementPresent Option2
click Option2
type Option2 Bad
type TimeOut 10
click link=Submit Poll
waitForTextPresent About the topic content ?
echo -Vote Poll-
click vote
waitForElementPresent link=Vote Now
click link=Vote Now
waitForElementPresent //table[@id='UIGrid']
verifyElementPresent //table[@id='UIGrid']
echo -Edit Poll with Vote Again-
waitForElementPresent //div[@id='UITopicDetailContainer']//a[text()='More Actions']
click //div[@id='UITopicDetailContainer']//a[text()='More Actions']
waitForElementPresent //form[@id='UITopicPoll']//a[text()='Edit']
click //form[@id='UITopicPoll']//a[text()='Edit']
waitForElementPresent //input[@name='VoteAgain']
click //input[@name='VoteAgain']
type Option0 Good Update
type Option1 Normal Update
type Option2 Bad Update
waitForElementPresent link=Submit Poll
click link=Submit Poll
waitForTextPresent Good Update
verifyTextPresent Good Update
echo -Vote Again-
waitForElementPresent link=Vote Again
click link=Vote Again
waitForElementPresent //input[@name='vote' and @value='Normal Update']
click //input[@name='vote' and @value='Normal Update']
waitForElementPresent link=Vote Now
click link=Vote Now
waitForElementPresent link=Vote Again
echo -Delete Poll-
waitForElementPresent link=Remove
click link=Remove
verifyConfirmation Are you sure to delete this poll?
waitForTextNotPresent About the topic content ?
verifyTextNotPresent About the topic content ?
echo -Delete Test Data-
waitForElementPresent link=Cate1_SNF_KS_32
click link=Cate1_SNF_KS_32
waitForElementPresent link=Manage Category
click link=Manage Category
waitForElementPresent link=Delete
click link=Delete
verifyConfirmation Are you sure to delete this category?
waitForTextNotPresent Cate1_SNF_KS_32
verifyTextNotPresent Cate1_SNF_KS_32
waitForElementPresent link=Logout
clickAndWait link=Logout
waitForTextPresent Sign in