Testbytes IN website

How to Install Appium Server and Node on Windows through Command Line

July 5th, 2018
How to Install Appium Server and Node on Windows through Command Line

Appium is an open source mobile automation tool which is used to automation native and hybrid mobile apps. It can be used for Cross-platform testing i.e. Android and iOS using the JSON Wire protocol.

You can automate and test the apps using Appium server which acts as an intermediate between your java client and the mobile application. Appium is basically a node.js server and the best thing about Appium is that; it supports various languages – Ruby, Java, and JavaScript and C #. You could even run your test scripts on real devices and if not real devices then emulators and simulators.
Let’s understand How the Architecture of Appium Works
Appium is basically an HTTP server. This server is written in Node.js and it helps to create multiple web Driver session against different platforms. This Appium server receives request from java client which listens for commands from Appium Server.
Let’s have a look at Appium in detail with this video representation.

The way of working of Appium server is almost the same as in selenium RC. The way iOS and android interact with server is quite different. In case of Ios, an Appium proxy commands to a UIAutomation Script. This script would be running in MAC environment.
This application in Ios is called Instruments. In case of android almost everything is same where the server proxy commands to a UIAutomator test case. UIAutomator is a native UI Automation framework which supports junit test cases.
Now let us look at the command line way in which you can install Appium Server on your windows machine.
Through Command Line
The prerequisite for installing Appium server through command line would be installing Node.Js First, let’s look at the steps involved in installing node.js in your system.

banner

  • You can visit the node.js official website where you will be able to download node.js. There, you will find installers for different configurations depending upon your system.  Find the correct installer for your OS.
  • Click on the file. You will get a dialog box there. You can click on “Save File”.
  • Once, the downloading part is complete; Go to downloads folder and double click on the installer. Click on Run.
  • installation process begins now.  You can click on Next to continue the installation.
  • You also have to select the radio button for accepting the terms in the license agreement. Again click on Next button.
  • Now specify the folder in which you want to keep the setup. You can specify that depending upon the space condition of your system.
  • Just click on Next no need to edit anything.
  • Now comes to the main task; click on install to basically start the installation.
  • In the end, click on finish to let the installation finish. Now, node.js is successfully installed in your system.

Also Read: Why Appium is Impeccable in iOS and Android App Testing

When you will install node MSI from the official site using above steps NPM tool would also get installed which will be used in installing Appium using the command line. Appium is a node.js server hence it is mandatory to install node in your machine before installing Appium.
Now, let us see how npm can actually help you in downloading through the simple command line.

  • First Open a command prompt as an administrator.
  • First check whether the node is correctly installed or not. You can check that by typing node–v
  • If you are getting a proper version number then go ahead to check if npm is properly installed or not. You can check that by npm –v on your command line.
  • Once you get the proper version number that means npm is properly installed in your machine.
  • Once that is opened then type  npm install –g appium
  • This above command will get the latest Appium server on your machine
  • But, if you want a particular version to be installed then you can use the command as: npm install –g appium@1.6.x
  • This above command will help in downloading appium version according to your requirements.
  • Also, if you want to check if all your Appium dependencies are properly installed or not. There is an easy to check it using npm. You can use Appium-doctor for that.
  • But for that, you first have to install Appium-doctor using npm package installer. You have to run the command : npm install –g appium-doctor
  • The above command will install the Appium-doctor and now, you can check whether the dependencies are properly installed or not using the command: Appium-doctorand along with that, you have to provide a flag. The flag can be –ios or –android.

Now, you got to know how you can install Appium using the command line. It is a very simple process rather than doing headache of downloading from the internet. Once you are done with installing Appium using the command line, you could also invoke Appium server using the command line. To start Appium using command line; you have an open command prompt as an administrator and run command appium –a  127.0.0.1  -p 4723. A is the IP address and p is the port number. If the specified command ran successfully you would receive on command prompt a message which says “Welcome to Appium and Appium listener started on 127.0.0.1:4723 .
mobile app
Also, the best part about npm is that if at any point of time you don’t want Appium in your server then you don’t need to take the headache of going to that particular folder and delete it.
You can simply install it using command: npm uninstall –g appium. It would remove all the Appium files from your system. Also, if you are having more than 1 version of Appium in your system then also you can uninstall a particular version number of Appium using command: npm uninstall –g appiu@1.6
Conclusion
Hence, now you got to know that installation of Appium is damn easy with command line rather than doing it manually. NPM is a wonderful package installer and makes your task easier. Install it and start the automation. All the best!!

Testbytes IN website
Recent Posts
Subscribe
Please enter valid email address

Contact Us
Please type your Name
Please enter valid email address
Please enter phone no.
Please enter message
Testbytes IN website

Search Results for:

Loading...

Contact Us