Appium : How to start Appium server using command line

How to start Appium server using command line 


This is very common scenario where you will be needed to trigger/start Appium server either using command line or trigger through .bat file in automation.
I will explain here step by step how to do this and creating a .bat file in the end.

*** You can download batch file from here “appiumserver”(see explanation below)

To do this, please follow the below steps:

 Step 1: Make sure you have Node installed (if not, download it fromlink )  and would be good if
              you configured in your path variable, such that you can run node  from anywhere in your pc
              .It will be helpful in your automation.

Type node in command prompt, you will see like below screenshot (if it configured properly)
C :\> node        


 Step 2: Make sure you have Appium server is installed.

 Step 3: Open Command Prompt and navigate to Appium folder till below path(based on your
              machine ,path may change)
C:\Program Files (x86)\Appium\node_modules



 Step 4: Now run below command, with Appium server argument which you think to be part of it, I
              have passed minimum argument, based on your requirement you can add more.

 -> node appium --address 127.0.0.1 --port 4725 --platform-name Android --platform-version 19 --automation-name Appium



You can see Appium started at port 4725 , 



You can also verify one step ahead by hitting the below URL in your browser
http://127.0.0.1:4725/wd/hub/status 




Step 5:  Creating a batch file, this will make your life little easier in setup and running Appium script.
              Open notepad and paste below code and save it as "appiumserver.bat"
REM ############################################################################ 
REM ## START

echo "navigating to Appium folder"
REM ## change the folder path , based on your machine
cd /D C:/Appium/Appium/node_modules
node appium --address 127.0.0.1 --port 4725 --platform-name Android --platform-version 19 --automation-name Appium

REM ##END
REM############################################################################

You can download it from here “appiumserver

Comment down below for any questions.



Android : How to connect your Android device over Wifi using ADB command for App debugging

How to connect your Android device over Wi-Fi using ADB command Sometimes it requires to connect your Android dev...