首页 > 移动平台 > 详细

windows 上启动appium

时间:2017-01-24 17:56:03      阅读:293      评论:0      收藏:0      [点我收藏+]

import org.apache.commons.exec.CommandLine;

import org.apache.commons.exec.DefaultExecuteResultHandler;

import org.apache.commons.exec.DefaultExecutor;

public void startAppiumOnWindows(String port) {

CommandLine command = new CommandLine("D:/app/appium/Appium/node");

command.addArgument("D:/app/appium/Appium/node_modules/appium/bin/appium.js",false);

command.addArgument("--address", false);

command.addArgument("127.0.0.1");

command.addArgument("--port", false);

command.addArgument(port);

command.addArgument("--full-reset", false);

command.addArgument("--session-override", false);

DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();

DefaultExecutor executor = new DefaultExecutor();

executor.setExitValue(1);

try {

executor.execute(command, resultHandler);

Thread.sleep(5000);

}

catch (IOException e) {

e.printStackTrace();

}

catch (InterruptedException e) {

e.printStackTrace();

}

}

 

windows 上启动appium

原文:http://www.cnblogs.com/lisawu/p/6347370.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!