How to install Appium in Ubuntu

This is a small post that provides you the information on installing Appium on Ubuntu.

Steps to install Appium

Install dependencies required by Appium

Run the below command on your Terminal

sudo apt-get install build-essential \
curl git m4 ruby texinfo libbz2-dev \
libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev

Install linuxbrew

Linuxbrew is required to install Node.we need node to install Appium

sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

You should see this message on your Terminal

Screenshot from 2018-04-18 21:00:18

Export path variables

# Add this to end of bashrc
vim ~/.bashrc

export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"
export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"

# Source bashrc
source ~.bashrc

Install gcc

Installing GCC is recommended by linuxbrew

brew install gcc

Install node

brew update
brew install node
brew link node
 

Install Appium:

npm install -g appium
npm install wd
 

Start Appium

Run the command on your Terminal

$ Appium

Screenshot from 2018-04-18 21:17:41

Install Appium doctor

Appium doctor is very useful to check the configs required for Appium. Install it be this command:

npm install appium-doctor -g
$ appium-doctor

Set path variables for ANDROID_HOME and JAVA_HOME

Set the important env variables in the bashrc file

export ANDROID_HOME=~/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$JAVA_HOME/bin

source ~/.bashrc

Install Appium Python client

We will use python for our Appium tests so we need to install Appium-Python-Client on our box. Use this command to install. You can skip this step if you’re using Java for your Appium tests:

sudo apt-get install pip
sudo pip install Appium-Python-Client

Note: You would need to restart appium in a new terminal once you set the path variables.

Voila! That’s all about this post. Happy testing!!

I am a greenhorn Data Science student with interest in finding patterns in data. My language of choice is Python and I am starting to get my hands dirty with R.

Checkout my portfolio here: https://confusedcoders.com/nikita-sharma-greenhorn-data-science-student

I blog on Medium.com [1] and ConfusedCoders.com [2]. I share my code on Github.com [3].

  1.  https://medium.com/@nikkisharma536
  2. https://confusedcoders.com/author/nikita
  3. https://github.com/nikkisharma536

Leave a Reply

Your email address will not be published. Required fields are marked *