Drag and drop issue with Selenium web driver -


i trying drag , drop 'tea' on following website:

https://gojs.net/latest/samples/htmldragdrop.html?gclid=eaiaiqobchmi0nw75ixy1qivmljach26rwtjeaayasaaegliofd_bwe

here code have:

webelement element = driver.findelement(by.xpath(".//div[contains(text(), 'tea')]"));  webelement target = driver.findelement(by.xpath("//div[@id='mydiagramdiv']")); actions action = new actions(driver); action.clickandhold(element).build().perform(); actions action2 = new actions(driver); action2.movetoelement(target).build().perform(); action2.release(target).build().perform(); 

i have tried of following xpath's target element, none of seems work. ideas wrong?

//div[@id='mydiagramdiv'] //div[@id='mydiagramdiv']/ancestor::span[1] //div[@id='mydiagramdiv']/canvas //div[@id='mydiagramdiv']/div 


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -