Please help me in configuring appium from the terminal. Please provide the complete steps to do it along with the software versions.
-
go through this link :https://github.com/saikrishna321/VodQa_MobileAutomationWorkShop/wiki/Appium-Mac-Installation – Suraj Jogdand Jun 06 '18 at 12:14
-
How to uninstall something that is installed through sudo command? – Soubhagya Mishra Jun 06 '18 at 12:21
-
@SoubhagyaMishra which method did you use to install it? Normally tools that install things have uninstall commands as well. For npm it is: npm uninstall
– zypherman Jun 08 '18 at 19:41
1 Answers
This is a little guide I've created for setting up Appium on Mac, but I'm sure you can find a lot of tutorials on this just by googling it.
First, you will need to download Android Studio: https://developer.android.com/studio/
After that, set ANDROID_HOME path in your ".bash_profile" file:
Navigate to home directory (type "cd" anywhere in terminal to go to home directory), type "ls -a" to list all files, ".bash_profile" file should be listed (if it's not listed create it with "touch .bash_profile"), add following lines to ".bash_profile" file:
Path to ANDROID_HOME
export ANDROID_HOME=/Users//Library/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
after saving file type "source .bash_profile" for changes to take effect.
Homebrew
HomeBrew is a command line package manager for OS X. It is not officially recognized, but it has become a standard de facto for the distributions of tons of useful tools. Install it by running following command from Terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)". For more info about Homebrew visit: https://brew.sh/
Python 2.7
Python should be pre-installed on macOS. To check if Python is installed type "python --version" in Terminal, output should show currently installed version (e.g. "Python 2.7.10"). If Python is not installed for some reason, you can install latest version with command "brew install python"
Appium and Appium dependencies
Install Appium desktop application from here http://appium.io/ (e.g. "appium-desktop-1.2.6-mac.zip")
Install carthage which is an Appium dependency with command "brew install carthage --HEAD" (if you want to see where carthage is installed type "which carthage")
Install pip package manager with command "sudo easy_install pip"
Install Appium Python client (if you want Java, Ruby, C# client, just change it, instead of Python) with command "pip install Appium-Python-Client"
Install Node.js and NPM with command "brew install node" (to verify node and npm are installed type "node -v" and "npm -v" in terminal)
Install appium doctor with command "sudo npm install appium-doctor -g". Appium doctor will tell you if there are some missing dependencies, to use it type "appium-doctor" in terminal.
Run commands "sudo npm install -g authorize-ios" and "sudo authorize-ios"
Set JAVA_HOME path in your ".bash_profile" file:
Navigate to home directory (type "cd" anywhere in terminal to go to home directory), type "ls -a" to list all files, ".bash_profile" file should be listed, edit ".bash_profile" with the next lines:
Path to Java
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=${JAVA_HOME}/bin:$PATH
after saving file type "source .bash_profile" for changes to take effect
If everything is set up correctly, when you run appium-doctor
from Terminal you will see something like this:
username$ appium-doctor
info AppiumDoctor Appium Doctor v.1.4.3
info AppiumDoctor ### Diagnostic starting ###
info AppiumDoctor ✔ The Node.js binary was found at:
/usr/local/bin/node
info AppiumDoctor ✔ Node version is 8.9.0
info AppiumDoctor ✔ Xcode is installed at:
/Applications/Xcode.app/Contents/Developer
info AppiumDoctor ✔ Xcode Command Line Tools are installed.
info AppiumDoctor ✔ DevToolsSecurity is enabled.
info AppiumDoctor ✔ The Authorization DB is set up properly.
info AppiumDoctor ✔ Carthage was found at: /usr/local/bin/carthage
info AppiumDoctor ✔ HOME is set to: /Users/majdukovic
info AppiumDoctor ✔ ANDROID_HOME is set to:
/Users/majdukovic/Library/Android/sdk
info AppiumDoctor ✔ JAVA_HOME is set to:
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
info AppiumDoctor ✔ adb exists at:
/Users/majdukovic/Library/Android/sdk/platform-tools/adb
info AppiumDoctor ✔ android exists at:
/Users/majdukovic/Library/Android/sdk/tools/android
info AppiumDoctor ✔ emulator exists at:
/Users/majdukovic/Library/Android/sdk/tools/emulator
info AppiumDoctor ✔ Bin directory of $JAVA_HOME is set
info AppiumDoctor ### Diagnostic completed, no fix needed. ###
info AppiumDoctor
info AppiumDoctor Everything looks good, bye!
info AppiumDoctor
username$

- 340
- 3
- 17