我已经尝试过下面的代码来拖放selenium webdriver。但它不起作用
System.setProperty("webdriver.chrome.driver","D:\\D Drive\\Software\\Selenium Latest Software\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("http://suvian.in/selenium/2.10dragAndDrop.html");
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
System.out.println("title is " + driver.getTitle());
WebElement fromDrag = driver.findElement(By.xpath("//h5[@id='drag1']/strong"));
WebElement toDrag = driver.findElement(By.xpath("//div[@id='div1']"));
Actions act = new Actions(driver);
act.clickAndHold(fromDrag).moveToElement(toDrag).release(toDrag).build().perform();;
请帮助解决这个问题。 在此先感谢。