Saturday, June 28, 2025

selenium webdriver – Getting this error when i run my java appium script


Once I save and run the code the compiler is displaying error with respect to DesiredCapabilities I believed I may need made an error whereas importing the jar so I uninstalled every part and put in it as soon as once more however nonetheless the error exists.

That is the code I’ve written.

package deal tutorial;

import java.io.File;
import java.web.MalformedURLException;
import java.web.URL;

import org.openqa.selenium.distant.DesiredCapabilities;

import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.distant.MobileCapabilityType;

public class base {

public static void most important(String[] args) throws MalformedURLException {
    // TODO Auto-generated technique 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 driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),cap);

}

}

That is the error that I get.

Error occurred throughout initialization of boot layer
java.lang.module.ResolutionException: Modules java.consumer and okio export package deal org.openqa.selenium.inner to module tutorial

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

PHP Code Snippets Powered By : XYZScripts.com