Test_SNF_ECMS_46_VoteDocument_ecmdemo
open /portal/public/acme/
windowMaximize
echo -- Login
click link=Login
type username root
type password gtn
clickAndWait link=Sign in
echo -- Go to Sites Explorer
waitForElementPresent link=Sites Explorer
clickAndWait link=Sites Explorer
echo --Open  driver pane
waitForElementPresent //div[@id='UISideBar']/div/div[1]/div[2]/div[1]/div/div/div/a/div
click //div[@id='UISideBar']/div/div[1]/div[2]/div[1]/div/div/div/a/div
echo --Open Public drive
waitForElementPresent link=Public
click link=Public
echo --Go to Detail View
waitForElementPresent //form[@id='UIAddressBar']/div[2]/table/tbody/tr/td[1]/a
clickAt //form[@id='UIAddressBar']/div[2]/table/tbody/tr/td[1]/a
echo -- Go to Action tab
pause 3000
waitForElementPresent link=Actions
click link=Actions
pause 3000
echo --Add Sample node
waitForElementPresent link=Add Document
click link=Add Document
waitForElementPresent selectTemplate
select selectTemplate label=Sample node
waitForElementPresent title
type title Test_SNF_ECMS_46
type summary test
type content test
waitForElementPresent link=Save as Draft
click link=Save as Draft
pause 3000
waitForElementPresent link=Close
click link=Close
pause 3000
echo --Go to Collaboration Tab
waitForElementPresent link=Collaboration
click link=Collaboration
waitForElementPresent link=Test_SNF_ECMS_46
click link=Test_SNF_ECMS_46
echo -- the first Vote : 4
waitForElementPresent link=Vote for document
click link=Vote for document
pause 3000
waitForElementPresent //span/div/div/div[2]/div/div/div/div/div/div/div/div[1]/div/div[4]
click //span/div/div/div[2]/div/div/div/div/div/div/div/div[1]/div/div[4]
echo --Avg Rating
waitForText //div[@id='UIDocumentInfo']/div[2]/div/div/div/div/div/div[2]/div[2] 4.0
verifyText //div[@id='UIDocumentInfo']/div[2]/div/div/div/div/div/div[2]/div[2] 4.0
echo --Delete Sample node
waitForElementPresent link=Test_SNF_ECMS_46
mouseDownRight link=Test_SNF_ECMS_46
waitForElementPresent //div[@class='MenuItem']/a[contains(text(),'Delete')]
click //div[@class='MenuItem']/a[contains(text(),'Delete')]
waitForElementPresent //div[@id='UIPopupWindow']/div/div[2]/div/div/div/div/div/div/div/div[2]/table/tbody/tr/td/div[1]/div/div/div/a
click //div[@id='UIPopupWindow']/div/div[2]/div/div/div/div/div/div/div/div[2]/table/tbody/tr/td/div[1]/div/div/div/a
waitForElementNotPresent link=Test_SNF_ECMS_46
verifyElementNotPresent link=Test_SNF_ECMS_46
echo --Logout
waitForElementPresent link=Logout
clickAndWait link=Logout