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
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
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!!
Where should i find bashrc file in my system to add the paths for appium?
I think it should be under the home directory.
Check there with ls -all.
You will find in home directory this is hidden you should press to ctrl + h to show hidden files
You have to write appium not Appium to start the appium server .
Thanks me Later 😀
You are right @Aman Munawar
Thanks Aman. Also thanks for helping Radha with her question.