Drag and drop issue with Selenium web driver -
i trying drag , drop 'tea' on following website:
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
Post a Comment