Test_SNF_KS_08_ksdemo_VoteQuestion
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/answers
echo -Add Question-
waitForElementPresent //div[@id='UIQuestions']//a[text()='Submit Question']
click //div[@id='UIQuestions']//a[text()='Submit Question']
waitForElementPresent QuestionTitle
type QuestionTitle SNF_KS_08
waitForElementPresent //iframe[@id='Question___Frame']
selectFrame //iframe[@id='Question___Frame']
waitForElementPresent //html/body/table/tbody/tr[2]/td/iframe
selectFrame //html/body/table/tbody/tr[2]/td/iframe
type //html/body The detail of SNF_KS_08
selectFrame relative=top
type EmailAddress root@localhost.vn
waitForElementPresent link=Save
mouseDown link=Save
waitForElementPresent //div[@id='UIAnswersPortlet']//a[text()='OK']
click //div[@id='UIAnswersPortlet']//a[text()='OK']
waitForTextPresent SNF_KS_08
verifyTextPresent SNF_KS_08
echo -Vote Question-
waitForElementPresent link=SNF_KS_08
click link=SNF_KS_08
waitForElementPresent FAQHomeStarVote3
click FAQHomeStarVote3
waitForTextPresent 4.0
verifyTextPresent 4.0
echo _Unvote Question_
click //div[@id='AnswersViewContent']//div[@class='DecoratorMC']//div[@class='OverVote']
verifyConfirmation Are you sure to remove your ratings?
waitForTextPresent 0.0
verifyTextPresent 0.0
click FAQHomeStarVote1
waitForTextPresent 2.0
verifyTextPresent 2.0
clickAndWait link=Logout
echo -More Vote Check-
open /portal/public/intranet/
waitForElementPresent //div[contains(text(),'Sign in')]
click //div[contains(text(),'Sign in')]
waitForElementPresent username
type username demo
waitForElementPresent password
type password gtn
clickAndWait //a[@id='UIPortalLoginFormAction']
open /portal/public/intranet/answers
waitForTextPresent SNF_KS_08
click link=SNF_KS_08
verifyTextPresent 2.0
click FAQHomeStarVote3
waitForTextPresent 3.0
verifyTextPresent 3.0
echo -Delete Test Data-
clickAndWait link=Logout
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/public/intranet/answers
waitForElementPresent link=SNF_KS_08
click link=SNF_KS_08
waitForElementPresent //div[@id='AnswersViewContent']//a[@title='Delete']
click //div[@id='AnswersViewContent']//a[@title='Delete']
waitForElementPresent //form[@id='UIDeleteQuestion']//a[text()='OK']
click //form[@id='UIDeleteQuestion']//a[text()='OK']
waitForTextNotPresent SNF_KS_08
verifyTextNotPresent SNF_KS_08
clickAndWait link=Logout
waitForTextPresent Sign in