Friday, July 15, 2016

Mobile IOS Automation Part 1 - Appium Configuration with MAC

In recent days I got the chance to work on a Mobile Automation assignment. I got enough time for hands-on. I didn't have much experience on mobile automation before. I thought of sharing installation steps for Appium on MAC. I pen down all the configuration details and sharing below, so others could take help from it:


MAC Configuration with Appium

List of downloads:-
1.        Download Appium version 1.XX (.dmg) file      from https://bitbucket.org/appium/appium.app/downloads/
2.        Download Appium-master from https://github.com/appium/appium/
3.        Download latest android sdk.
4.        Install latest Xcode
5.        Update Android sdk with
a)        Latest API level
b)        Android SDK Build tools, SDK tools and SDK platform-tools from tools
c)        Google USB driver and Google Web-driver from extras.
6.        Download safari-launcher from https://github.com/budhash/SafariLauncher for mobile web testing in iPhone.

Environment variables : -
1.    Open terminal
2.    vi .bash_profile 
3.    press 'i' and  enter these export commands
a)              export ANDROID_HOME=android sdk path
b)              export PATH=$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH
c)              press Esc key.
4.    ‘Shift’ + ’:’
5.    wq > enter
6.    re open terminal.

Installing IOS_Web_PROXY
1.      open terminal and enter these commands
 > ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
 > brew update
 > brew install ios-webkit-debug-proxy

Installing safari-launcher in iPhone
l  Require Apple account linked with developer program
l  Add device to developer program
l  Launch the Safari-launcher.app on connected device from Xcode.

Pre-Script Steps In terminal
·         ios_webkit_debug_proxy
·         cd
·         ./bin/ios-webkit-debug-proxy-launcher.js -c:27753


Configuring Appium from its source code
l  npm install appium@1.4.16
l  Run this bin/appium-doctor.js from installed appium folder
l  Copy .git folder from cloned appium (git clone https://github.com/appium/appium.git)
l  Navigate to appium folder and execute ./reset.sh)
l  Provide path of installed appium source code in “Use External Appium Package” in appium UI under Developer setting.
l  Troubleshooting
n  If error related to ideviceintaller :- Execute brew install --HEAD ideviceinstaller  

n  If error related to provisional profile :- Execute ./reset.sh --ios --ios-safari after navigating to installed appium folder.



@uthor 
Vaneesh Behl
vaneesh.behl@gmail.com