There is slight problem with this approach; when the element dropped to the new location it comes back to the original position. Rather i found an alternative to work around this problem. dragAndDrop.clickAndHold(element1).moveByOffset(element2.getLocation().getX()+1,element2.getLocation().getY()+1).release().perform(); Not sure what is wrong with the one given in the book. Any suggestion or info. Please share....
Share this highlighthttp://www.safaribooksonline.com/a/selenium-webdriver-practical/51707/