我已将selenium升级到最新版本3.14.0,发现以下方法抛出类转换异常
新的 Actions(driver).moveToElement(element).click().build().perform();
java.lang.ClassCastException:com.prahs.utils.logger.EventWebDriver$EventFiringWebElement 无法转换为 org.openqa.selenium.interactions.internal.Locatable
最佳答案
你可以试试这个方法
Actions action = new Actions(driver);
action.moveToElement("Web Element").click().perform();
构建是为了不同的目的,
引用链接:https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html
关于java - Selenium 3.14.0+ 升级 selenium 后 Actions.movetoElement 出现 ClassCast 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51848867/