简体   繁体   中英

how to launch appium node server through cmd prompt in windows 7 machine

I am doing mobile automation using appium with selenium.

I willing to run the appium server using commands through cmd prompt in windows machine.

Could any one help how to run through cmd prompt and what is the command to run it without clicking launch button in appium.exe.

Please anyone help me.Thanks in advance.

You can do this using Appium Support Library :

<dependency>
  <groupId>com.github.genium-framework</groupId>
  <artifactId>Appium-Support</artifactId>
  <version>1.0.5</version>
</dependency>

You can start the server in your code by doing this:

ServerArguments serverArguments = new ServerArguments();
serverArguments.setArgument("--address", "127.0.0.1");
serverArguments.setArgument("--chromedriver-port", 9516);
serverArguments.setArgument("--bootstrap-port", 4725);
serverArguments.setArgument("--no-reset", true);
serverArguments.setArgument("--local-timezone", true);

_appiumServer = new AppiumServer(serverArguments);

_appiumServer.startServer();

Hope this helps.

您可以通过运行以下命令来启动appium服务器

appium & (or) appium --avd emulator_name
  1. Follow the steps for installing the Node and npm here .
  2. Type npm install -g appium@1.3.7 #for specific version npm install -g appium # for the latest version

  3. In case of windows machine Make sure to include the path where you have installed the Appium in your System Environment variable (mine is C:\\Users\\XXX\\AppData\\Roaming\\npm\\node_modules\\appium)

After that open a new instance of CMD and launch the appium server with typing "appium" or with the parameters you like.

PS It works on OSX, Windows and Linux.

Please install Node.js from http://nodejs.org/download/

Then Clone appium from GitHub or Download appium for windows (that you are currently having)

Open cmd and Navigate/change directory to downloaded appium folder /node_modules/appium/bin.

Run node appium

You can also mention server arguments , refer from below link: https://github.com/appium/appium/blob/master/docs/en/server-args.md

对于正在寻找简单模块解决方案的任何人,我都创建了appium-controller ,可通过编程方式(mac或Windows)在后台启动和停止appium。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM