Reputation: 597
I have upgraded selenium to latest version 3.14.0, and found that the following method is throwing a class cast exception
new Actions(driver).moveToElement(element).click().build().perform();
java.lang.ClassCastException: com.prahs.utils.logger.EventWebDriver$EventFiringWebElement cannot be cast to org.openqa.selenium.interactions.internal.Locatable
Upvotes: 1
Views: 971
Reputation: 21
You may using different versions Selenium for api.
It is likely related to this?
Selenium Actions Class cannot be resolved in selenium version greater then 3.1
Upvotes: 0
Reputation: 4035
You may try this way,
Actions action = new Actions(driver);
action.moveToElement("Web Element").click().perform();
Build is for different purpose,
Reference Link : https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/interactions/Actions.html
Upvotes: 1