此问题已经困扰好久了,希望哪个高人帮忙解答一下,以下是代码:
程序启动 appium 代码 String processName =
"/Applications/Appium.app/Contents/Resources/node/bin/node "
+ "/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/main.js"
+ " --address \"127.0.0.1\" --command-timeout \"7200\" --debug-log-spacing"
+ " --platform-version \"9.1\" --platform-name \"iOS\""
+ " --app \"com.letv.store.iphone.client\""
+ " --udid \"9932377fd430f2e2b0e0bcc1da58179d4ff1e4d7\" --device-name \"iPhone 6\"";
String[] CMDS = new String[3];CMDS[0] = "/bin/bash";
CMDS[1] = "-c";
CMDS[2] = processName;
Runtime rt = Runtime.getRuntime();
try {rt.exec(CMDS);
try {
Thread.sleep(20000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}catch (ExecuteException e) { // TODO Auto-generated catch block e.printStackTrace(); }