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

15,268

Solution 1

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.

Solution 2

You can start the appium server by running the following command

appium & (or) appium --avd emulator_name

Solution 3

  1. Follow the steps for installing the Node and npm here.
  2. Type npm install -g [email protected] #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.

P.S. It works on OSX, Windows and Linux.

Share:
15,268
user3568504
Author by

user3568504

Updated on June 04, 2022

Comments

  • user3568504
    user3568504 almost 2 years

    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.

  • Suraj Gupta
    Suraj Gupta about 8 years
    Will this also work to run test on iOS device when appium is installed on mac machine.. or some parameter of command would differ
  • Hassan Radi
    Hassan Radi about 8 years
    It should be the same. Nothing should change.