-
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
-
-
Save TuHuynhVan/8f1cd45fccc9586de467cfc049b5e6bd to your computer and use it in GitHub Desktop.
Setting Up Appium on Mac
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment