MobileCapabilityType


#1

When I type MobileCapabilityType.
after dot no features or functions is coming
For example I want MobileCapabilityType.DEVICE_NAME, “emulator”);

But nothing is coming, please help me


#2

public class Base {

public static AndroidDriver<AndroidElement> Capabilities() throws MalformedURLException {

// If using emulator use src path
// File f= new File(“src”);
// File fs = new File(f,“ApiDemos-debug.apk”);
//
DesiredCapabilities cap = new DesiredCapabilities();
//
// cap.setCapability(MobileCapabilityType.APP, fs.getAbsolutePath());
cap.setCapability(MobileCapabilityType.DEVICE_NAME, “#”);
cap.setCapability(“deviceName”, “#”);
cap.setCapability(“platformVersion”, “#”);
cap.setCapability(“platformName”, “#”);
cap.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, “#”);
cap.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, “#”);

	AndroidDriver<AndroidElement> driver = new AndroidDriver<>(new URL("http://127.0.0.1:4723/wd/hub"), cap);
	driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);

	return driver;

}	

}

Refer this, it should work
jdk : 8