java.lang.ClassCastException: class org.openqa.selenium.By$ByXPath cannot be cast to class io.appium.java_client.AppiumBy (org.openqa.selenium.By$ByXPath and io.appium.java_client.AppiumBy are in unnamed module of loader 'app')
I am currently using A
Appium v2.0.1
Java client 8.5.1
Getting error at this line in my page class: private AppiumBy STANDARD_USER= (AppiumBy) AppiumBy.xpath ("some xpath");
Getting no logs at Appium as it fails in the initialization step only.
I observed that it was an issue with Eclipse IDE but not with Intellij Idea.
I just used private AppiumBy STANDARD_USER= (AppiumBy) AppiumBy.xpath (“some xpath”); as experiment after your reply and found it is not giving me ClassCastException in Intellij Idea IDE.