Test_SNF_ECMS_53_ViewReferences_ecmdemo
open /ecmdemo/public/acme/
windowMaximize
echo --Login
click link=Login
waitForElementPresent username
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
click //form[@id='UIAddressBar']/div[2]/table/tbody/tr/td[1]/a
echo -- Go to Action tab
pause 5000
waitForElementPresent link=Actions
click link=Actions
pause 5000
echo --Create a Article document
waitForElementPresent link=Add Document
click link=Add Document
waitForElementPresent title
type title Test_SNF_ECMS_53
waitForElementPresent //td[@id='cke_contents_summary']/iframe
selectFrame //td[@id='cke_contents_summary']/iframe
typeKeys //html/body ViewReferences_ecmdemo
selectFrame relative=top
selectFrame //td[@id='cke_contents_content']/iframe
typeKeys //html/body Manchester
selectFrame relative=top
waitForElementPresent link=Save as Draft
click link=Save as Draft
pause 5000
waitForElementPresent link=Close
click link=Close
pause 5000
echo --Go to root path
waitForElementPresent //div[2]/div/div/div[1]/div[2]/div[1]/div/div/div/div[1]
click //div[2]/div/div/div[1]/div[2]/div[1]/div/div/div/div[1]
echo --create another document
pause 5000
waitForElementPresent link=Add Document
click link=Add Document
waitForElementPresent selectTemplate label=Kofax document
select selectTemplate label=Kofax document
type name Kofax_SNF_ECMS_53
waitForElementPresent link=Save as Draft
click link=Save as Draft
pause 5000
waitForElementPresent link=Close
click link=Close
echo -- Add Relation
waitForElementPresent link=Test_SNF_ECMS_53
click link=Test_SNF_ECMS_53
echo --Open Add relation form
pause 5000
waitForElementPresent link=Admin
click link=Admin
waitForElementPresent link=Manage Relations
click link=Manage Relations
echo --Go to "Select relation tab"
waitForElementPresent //div[@id='UIRelationManager']/div/div/div[1]/div[1]/div/div/div/div/div[2]/div/div/div/div
click //div[@id='UIRelationManager']/div/div/div[1]/div[1]/div/div/div/div/div[2]/div/div/div/div
echo -- Select node to relation
waitForElementPresent //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[2]/a/div
click //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[2]/a/div
echo -- Select root
waitForElementPresent //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[2]/a/div
click //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[2]/a/div
echo -- Select Private
waitForElementPresent //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[2]/a/div
click //div[@id='UIOneNodePathSelector']/div/div[3]/div/div/div/div/div/div[2]/a/div
echo -- Select Kofax_SNF_ECMS_53
waitForElementPresent //div[@id='UISelectPathPanel']/table/tbody/tr[2]/td[2]/a/div
click //div[@id='UISelectPathPanel']/table/tbody/tr[2]/td[2]/a/div
waitForTextPresent /Users/root/Private/Kofax_SNF_ECMS_53
verifyTextPresent /Users/root/Private/Kofax_SNF_ECMS_53
waitForElementPresent link=Close
click link=Close
echo -- View References of Kofax
waitForElementPresent link=Kofax_SNF_ECMS_53
click link=Kofax_SNF_ECMS_53
waitForElementPresent link=Info
click link=Info
waitForElementPresent link=View References
click link=View References
waitForTextPresent /Users/root/Private/testsnfecms53
verifyTextPresent /Users/root/Private/testsnfecms53
waitForElementPresent link=Close
click link=Close
pause 3000
echo --Delete Relation
waitForElementPresent link=Test_SNF_ECMS_53
click link=Test_SNF_ECMS_53
waitForElementPresent link=Admin
click link=Admin
pause 5000
waitForElementPresent link=Manage Relations
click link=Manage Relations
waitForElementPresent //img[@alt='Delete']
click //img[@alt='Delete']
assertConfirmation Do you really want to delete this relation?
click link=Close
echo --Delete article document
waitForElementPresent link=Test_SNF_ECMS_53
mouseDownRight link=Test_SNF_ECMS_53
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_53
verifyElementNotPresent link=Test_SNF_ECMS_53
echo --Delete Kofax
waitForElementPresent link=Kofax_SNF_ECMS_53
mouseDownRight link=Kofax_SNF_ECMS_53
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=Kofax_SNF_ECMS_53
verifyElementNotPresent link=Kofax_SNF_ECMS_53
echo --Logout
waitForElementPresent link=Sign out
clickAndWait link=Sign out