New to Java here! Trying to automate a sample app and I'm getting the above error. The appium and selenium-java versions are compatible. Tried adding another dependency selenium-remote-driver but the issue still persists.
<dependencies>
<!-- https://mvnrepository.com/artifact/io.appium/java-client -->
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>7.3.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
</dependencies>
Can someone please help?
public class base {
public static void main(String[] args) throws MalformedURLException {
File appDir =new File("src");
File app =new File(appDir, "ApiDemos-debug.apk");
DesiredCapabilities cap=new DesiredCapabilities();
cap.setCapability(MobileCapabilityType.DEVICE_NAME, "Pixel 4-Test");
cap.setCapability(MobileCapabilityType.APP, app.getAbsolutePath() );
cap.setCapability(MobileCapabilityType.AUTOMATION_NAME, "uiautomator2");
AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL("http://127.0.0.1:4723/wd/hub"), cap);
}