Test_SNF_ECMS_46_VoteDocument_ecmdemo
open /ecmdemo/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 Private driver
waitForElementPresent link=Private
click link=Private
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 label=Sample node
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
click link=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=Sign out
clickAndWait link=Sign out