how to launch appium node server through cmd prompt in windows 7 machine
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
- Follow the steps for installing the Node and npm here.
Type
npm install -g [email protected] #for specific version npm install -g appium # for the latest version
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.
user3568504
Updated on June 04, 2022Comments
-
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 about 8 yearsWill 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 about 8 yearsIt should be the same. Nothing should change.