When I save and run the code the compiler is showing error with respect to DesiredCapabilities I thought I might have made an error while importing the jar so I uninstalled everything and installed it once again but still the error exists.
This is the code I have written.
package tutorial;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.remote.MobileCapabilityType;
public class base {
public static void main(String[] args) throws MalformedURLException {
// TODO Auto-generated method stub
File f = new File("src");
File fs = new File (f,"tile-sdk26-debug-2.43.0-d.apk");
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(MobileCapabilityType.DEVICE_NAME, "Nexus 5x");
cap.setCapability(MobileCapabilityType.APP, fs.getAbsolutePath());
AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL("http://127.0.0.1:4723/wd/hub"),cap);
}
}
This is the error that I am getting.
Error occurred during initialization of boot layer java.lang.module.ResolutionException: Modules java.client and okio export package org.openqa.selenium.internal to module tutorial