Test_SNF_SOC_28_Demo_DragDropGadgetinDashboard
open /socialdemo/public/classic/
windowMaximize
click link=Sign in
waitForElementPresent username
type username root
type password gtn
clickAndWait //div[@id='UIPortalLoginFormAction']//div[@class='ButtonMiddle']/a
waitForElementPresent link=Dashboard
clickAndWait link=Dashboard 1,1
pause 200
echo --Add gadgets into dashboard page
waitForElementPresent link=Add Gadgets
click link=Add Gadgets
pause 200
echo --Choose "root" node
echo --By Url--
waitForElementPresent xpath=//input[@id='url']
type xpath=//input[@id='url'] http://www.google.com/ig/modules/datetime.xml
waitForElementPresent xpath=//img[@class='AddNewNodeIcon'] 1,1
click xpath=//img[@class='AddNewNodeIcon'] 1,1
pause 500
verifyElementPresent xpath=//div[@class='GadgetTitle']
echo -- Close Dashboard Workspace--
waitForElementPresent //div[@id='UIDashboard']/div/div/div/div/div/div/div/div[2]
click //div[@id='UIDashboard']/div/div/div/div/div/div/div/div[2]
echo --Delete gadget--
waitForElementPresent //div[@class='CloseGadget IconControl']
click //div[@class='CloseGadget IconControl']
assertConfirmation Are you sure to delete this gadget?
pause 1000
echo --By drag and drop
waitForElementPresent link=Add Gadgets
click link=Add Gadgets
waitForElementPresent xpath=//div[@class='UIDashboardContainer']/div/div/div[2]
waitForElementPresent xpath=//div[@class='GadgetTitle' and @title='Calculator']
dragAndDropToObject xpath=//div[@class='GadgetTitle' and @title='Calculator'] xpath=//div[@class='UIDashboardContainer']
pause 1000
waitForElementPresent //div[@id='UIDashboard']//div[@class='CloseButton']
click //div[@id='UIDashboard']//div[@class='CloseButton']
waitForElementPresent xpath=//div[@class='UIDashboardContainer']/div/div/div[3]
verifyTextPresent Calculator
echo -- Delete Drag and drop Gadget
waitForElementPresent //div[@onclick='eXo.gadget.UIGadget.deleteGadget(this)']
click //div[@onclick='eXo.gadget.UIGadget.deleteGadget(this)']
waitForConfirmation Are you sure to delete this gadget?
verifyTextPresent Drag your gadgets here.
waitForElementPresent link=Sign out
clickAndWait link=Sign out