Download and Install Appium For Ubuntu



Download and Install Appium For Ubuntu



In this Appium tutorial we will learn how we can set up Appium on Linux (ubuntu) platform.

Below is the list of software that is required:

1. Java
2. Android SDK (Android Studio)
3. Node.js
4. Appium Desktop Server


1)        Install JAVA(JDK/JRE) & set JAVA_HOME

● Install Java Development Kit Software from:

$ sudo apt-get update
$ sudo apt-get install default-jre
$ sudo apt-get install default-jdk
//to install oracle jdk
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer



● In order to set JAVA_HOME on linux you need to edit the .bashrc
and need to specify the path of the java directory.

$ vi ~/.bashrc
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=${PATH}:${JAVA_HOME}/bin

● Run below command to verify that recently saved environment
variables are displaying the correct path or not.

$ echo $JAVA_HOME
$ echo $PATH

NOTE: Use the command: $ which java to find out exact path to which java
Executable

2)        Install Node.js without using sudo

● Do not install node.js through apt-get, which will need sudo rights and
appium will not work if node.js is installed as sudo user.

If you have already installed remove it using commands:
$ sudo apt-get remove nodejs
$ sudo apt-get remove npm
● Download latest nodejs linux binaries from

https://nodejs.org/download/release/latest/ into a folder for example

/home/username/Downloads.
$ cd /usr/local tar --strip-components 1 -xzf
/home/username/Downloads/node-v8.2.1-linux-x64.tar.gz


● For Verification use below commands:

$ which node //it should give you output like:
usr/local/bin/node
$ node -v //it should give you output v8.2.1 (or whichever
version you have installed)

3)         Install Android Studio

● Download and install Android Studio from Official Google Website:

● Open terminal and Enter:
$ cd android-studio/bin
$ . studio.sh //To execute the studi.sh script

● Now the android studio will open. Click next and let it download required
things.

● Once android sdk is installed add ANDROID_HOME to environment
variable using:

$ vi /.bashrc
export ANDROID_HOME=/home/user_name/Android/Sdk
export PATH=$PATH:/home/user_name/Android/Sdk/tools
export PATH=$PATH:/home/user_name/Android/Sdk/platform-tools


4)        Install Appium globally:
  
● Open a terminal and enter below commands in order to install the
appium globally.

$ npm install -g appium
$ appium //To start the

5)        Install appium-doctor to troubleshoot the errors if any using


● Please install Appium-Doctor(Node Utility) using npm, It will diagnose
and fix common Node, iOS and Android configuration issues before
starting Appium.

$ npm install -g appium-doctor
//then
$ appium-doctor
//it will give checklist of which things are okay & which
aren’t



SHARE THIS

Author:

My Name is Ankur Jain and I am currently working as Automation Test Architect.I am ISTQB Certified Test Manager,Certified UI Path RPA Developer as well as Certified Scrum Master with total 12 years of working experience with lot of big banking clients around the globe.I love to Design Automation Testing Frameworks with Selenium,Appium,Protractor,Cucumber,Rest-Assured, Katalon Studio and currently exploring lot in Dev-OPS as well. I am currently staying in Mumbai, Maharashtra. Please Connect with me through Contact Us page of this website.

Previous Post
Next Post