Linked Questions

Popular Questions

How to fix DesiredCapabilities error in java appium?

Asked by At

I am getting this error "The type org.openqa.selenium.remote.DesiredCapabilities cannot be resolved. It is indirectly referenced from required .class files"

when I compile and run the program.

when I hover the mouse near the error location in the code this is the information its displaying.

""The type org.openqa.selenium.remote.DesiredCapabilities cannot be resolved. It is indirectly referenced from required .class files

package manoj_test;

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.AndroidElemen0t;
import io.appium.java_client.remote.MobileCapabilityType;

public class tes12 {

public static void main(String[] args) throws MalformedURLException {
    // TODO Auto-generated method stub
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(MobileCapabilityType.DEVICE_NAME, "0260dd0730971a0a");
cap.setCapability(MobileCapabilityType.APP, "/home/manoj/Downloads/xyz.apk");
AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL("http://127.0.0.1:4723/wd/hub"),cap);



}

}

Related Questions