Appium setup for Mac

Note : Never SUDO install anything. We have faced a lot of issues by installing things as SUDO. Do not do that.Java:

Make sure you have installed the JDK(Install JDK 1.8.X)

By default the java path will be shown as usr/bin/java. But, change the path as below

Actual path – /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home

Make sure java path in your bash is set as below

Android Studio :

Setup Android Studio:

Follow this tutorial – How to setup Android Studio

Once the setup is done. Make sure you have configured the following in your bash Profile

Make sure you set the Android home to sdk folder and the paths for Platform-tools, tools and build-tools folder. This are required for the command line instantiation of the android Virtual device.

Configuring Emulators:

  • Open Android Studio
  • Click on Tools → AVD Manager

(Failed to find Build Tools revision 27.0.3 – If this error is shown in build sync box – update tools with the link in the line below it)

(If AVD manager is not listed, then update android tools in preferences)

  • Click on Create Virtual Device
  • Click on Phone in Category and choose any Name(e.g Pixel) and click on Next
  • Choose any Release Name(Oreo/Nougat etc). You will see a Download option highlighted in blue next to the release name. It represents the API Level. If you are choosing a Release name which has Download option, Click on Download so that all the required files will be downloaded(This may take a while) and click on Next.
  • You can add any name for the device and click on Finish
  • Click on Launch button to launch the Device

xCode Installation:

  • Go to App Store
  • Search for Xcode and Click on download
  • The version should be 9.X or greater
  • Once xCode is installed install the command line tools with following command
$ xcode-select –install

Appium Installation :

Installing Appium GUI :

This version of appium is called as Appium Desktop. This GUI is mainly used to write tests and using the inspector and actually see a graphical way of locating elements in the Android and iOS devices.

  • Go to the Link – http://appium.io/
  • Click on Download Appium button
  • Click on the Downloaded .dmg file
  • Complete the installation in the GUI.

Installing Appium as Node:

Why do we need command line appium(Appium Server)?

This version of appium is called as Appium server because when you want to integrate your appium tests to Continuous Integration(CI) tools like Jenkins you will need to run the tests via command line. To do this we will use Appium server instead of Appium Desktop(Appium GUI).

Why should you install Appium as Node?

Appium is a HTTP server written in Node.js. So appium requires an Node.js environment to run on any machine. So Appium has to be installed as node.

Install HomeBrew:

  • Open Terminal
  • Run the following command

$ /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
  • Verify whether HomeBrew is installed with the following command
$ brew –version

Install Carthage:

  • Open terminal and run the following command
$ brew install carthage

Install Node:

  • Open Terminal and run the following command
$ brew install node
  • Verify whether npm is installed by the following command. Make sure the version returned should be greater than 5.3.X
$ npm –version
  • Verify whether the Node is installed by the following command
$ node -v

Install Appium Doctor:

  • Open Terminal and run the following command
$ npm install -g appium-doctor
  • Run the following command to check all the pre setups required for appiums are installed or not
$ appium-doctor
  • Make sure you get and output like this
  • Make sure you get the message “Everything looks good, bye!” at the end. If you get any error go back to the setup steps and fix it. (Most likely ANDROID_HOME, JAVA_HOME path location related issues may arise)

Install Appium:

  • Open the Terminal and run the following command
$ npm install -g appium
  • Verify the appium installation with the following command
$ appium -v

Mac Real device Configuration :

iOS Real Device Configuration in Mac :

iOS Real Device Configuration

Issues faced and links used :

Error Code 65

Error Code 65(1)

Referral Docs :

https://github.com/isonic1/appium-workshop/blob/master/Appium%20Mac%20Installation%20Instructions.md

Refer here for Appium real device configuration in mac

One Commnet on “Appium setup for Mac

Leave a Reply

Your email address will not be published. Required fields are marked *