Failed to start appium driver programatically in Mac OS (10.11) for Android device


#1

Failed to start appium driver programatically in Mac OS (10.11) for Android device:

I used following commands:

final List argumentList = new ArrayList();
argumentList.add(exePath);
argumentList.add(jsPath);
argumentList.add("–address");
argumentList.add(hostIP);
argumentList.add("–port");
argumentList.add(port);
argumentList.add("–bootstrap-port");
argumentList.add(bootStrapPort);
argumentList.add("–chromedriver-port");
argumentList.add(chromeDriverPort);
argumentList.add("–udid");
argumentList.add(udid);
if (logPath != null && !logPath.trim().equals("")) {
argumentList.add("–log");
argumentList.add(logPath);
}
if (“safari”.equalsIgnoreCase(browser)) {
argumentList.add("–safari");
}
argumentList.add("–no-reset");
final ProcessBuilder prcessBuilder = new ProcessBuilder(
argumentList);
final Process process = prcessBuilder.start();

Debugged the code and it get stuck @

URL url = new URL(“http”, hostIP, Integer.parseInt(port), “/wd/hub”);
driver = new AppiumDriver(url, capabilities) {

			@Override
			public MobileElement scrollToExact(String arg0) {
				return null;
			}

			@Override
			public MobileElement scrollTo(String arg0) {
				return null;
			}
		};

This issue specific to following configuration:

Mac: 10.11 (EI-Capitan)
Xcode: 7.2
Appium: 1.4.13

@pr4bh4sh


#2

Appium java client has the capability to start the server programmatically, you don’t need to use Process anymore. I am not working with java and Appium, so I don’t have any working snippet as of now. You can refer from here


and