-
Set up for Appium:
- Reference:
- install xcode:
-
make sure you are NOT installing the latest version. Install v7 here: https://developer.apple.com/download/more/
-
make sure the correct simulators are downloaded at xcode -> preferences -> components
NOTE: If you don't have the correct simulators downloaded then you will get the error: "Could not find a device to launch..."
-
- install carthage which is an appium dependency: https://github.com/Carthage/Carthage
- make sure npm is updated:
sudo npm install npm@latest -g
- Install appium > 1.5:
sudo npm install -g appium@1.6.2 --no-shrinkwrap
- Possible issue with Mac Sierra. Solve by uninstalling and reinstalling appium-doctor: appium/appium#6609
sudo npm install -g authorize-ios
sudo authorize-ios
- set
java_home
Reference: http://www.sajeconsultants.com/how-to-set-java_home-on-mac-os-x/- To find java: "which java"
JAVA_HOME
is the path to the directory that contains the bin directory where java is.- in ~/.bash_profile:
export JAVA_HOME=""
- Add
$JAVA_HOME/bin
to your path variable
npm install appium-doctor
appium-doctor
(--ios
or--android
) to check setup
-
Set up for Android:
-
Reference:
-
Download, install and launch Android Studio
-
click on "configure" ==> "SDK Manager" ==> "Android SDK"
-
Make sure following are installed (under "SDK Tools"):
- Android SDK Tools
- Android SDK Platform-tools"
- Android SDK Build-tools (highest version)
- Android Support Repository/Library
- Google Repository
- Intex x86 Emulator Accelerator (HAXM Installer)
-
Under the SDK platforms section make sure the correct platform version is installed (should correspond to the android settings in appium)
-
Note the path to SDK from this sdk manager screen.
-
Add ANDROID_HOME environment variable with path to sdk and add that to your path
-
nano ~/.bash_profile
-
export ANDROID_HOME={YOUR_PATH}
-
Add to your current path variable:
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
-
ctrl + o, enter, ctrl + x
-
source ~/.bash_profile
-
type ```adb devices`` in the command line to check if ANDROID_HOME environment variable set correctly NOTE: If "adb" command is not found then you need to check if the path to Android sdk platform-tools is in your path.
-
-
Connect iPhone:
- Reference: https://discuss.appium.io/t/mobile-web-automation-on-ios-real-device-safari/4900
- Get UDID of iphone and use it in desired capabilities:
- connect iphone to mac computer via usb
- open itunes and go to file --> devices
- Get a bundle ID and use it in desired capabilities (bundleID)
- You have to register as an apple developer
- Then set up a wildcard bundle ID
- Install ideviceinstaller
- Reference: http://macappstore.org/ideviceinstaller/
- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
- brew install ideviceinstaller
-
Use correct desired capabilities: https://appium.io/slate/en/master/?ruby#appium-server-capabilities
Created
May 31, 2017 20:29
-
-
Save maggiesavovska/d2d47345c92fdf70ed4ec10ebb34c170 to your computer and use it in GitHub Desktop.
Setting Up Appium on Mac
Appium Installation full setup on Mac for real device iOS automation (GUI & Command line tools), follow this link for without errors, might be helpful for others
https://techsouljours.blogspot.com/2018/08/appium-installation-full-setup-on-mac.html
When I am trying to do sudo npm install -g appium@1.6.2 --no-shrinkwrap
I am getting error in mac os mojave
WARN tar EISDIR: illegal operation on a directory, open '/usr/local/lib/node_modules/.staging/appium-adb-c3aa80d3/lib/tools'
npm ERR! path /usr/local/lib/node_modules/appium/node_modules/commoner/node_modules/esprima/bin/esparse.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/appium/node_modules/commoner/node_modules/esprima/bin/esparse.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
Do u have any idea how to resolve?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, just wanted to say thanks for putting this together! I found it while searching for how to setup appium on OS X, and it REALLY came in handy.