我正在爲我的項目使用Selenium Webdriver。我已經將代碼自動化到鼠標懸停在圖像上,這已成功完成。但是,有些如何無法通過此代碼將超鏈接拖放到超鏈接上。如何在超鏈接上進行鼠標懸停 - Webdriver
我使用的代碼是
Actions build1 = new Actions(driver); build1.moveToElement(WebElement).build().perform();
我使用
Locatable hoverItem = (Locatable) driver.findElement(); Mouse mouse = ((HasInputDevices) driver).getMouse(); mouse.mouseMove(hoverItem.getCoordinates())
也試過,但它也不能正常工作了。請幫我在這
這與他最初的'Actions build1 = new Actions(driver)有什麼不同? build1.moveToElement(WebElement).build()執行();'? –