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"

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:$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!!

6 thoughts on “How to install Appium in Ubuntu”

Leave a Reply

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