Appium For Mac Jsonmac

I just completed setting up my Mac for Appium and wanted to share my findings with all. Unlike Windows, the steps to setting up Mac machine for iOS devices is not that easy. We will see the complete steps required in order to get us ready for iOS testing with Appium on Mac OS X.

Thank you.02-Apr-12 16:57Good!:DOther Drivers//////////© 2013-2020. Thank you!02-Nov-12 23:34I'll give it a shot, hopefully that works!17-Aug-12 15:23Absolutely awesome! Universal Driver Updater:1) Choose Your Operation System:2) Enter Captcha Code:Sil1364 add2 dvi File Name: sil1364add2dvi.exeVersion: 2.0.2Driver Date: 20 August 2013File Size: 664 KBAvailable for: Windows 98, Linux, Windows 7, Windows XP, Windows Vista, Windows 8, Mac OSChoose Operation System:Enter Captcha Code:Downloaded: 363 timesLast Time: 14 May 2020Best Comments09-Aug-13 08:57awesome driver for Sil1364 add2 dvi!!120-Dec-12 00:54it works! Silicon image sil1364 dvi add2-n driver for mac.

Now we will see what steps we need to follow, so make sure you are following it properly.

Step 1: Needs Mac OS X

To start appium in MAC, all you need to do is to type = appium & in the terminal application. In order for the above command to work, you have to install appium in terminal mode. However there are 2 ways of doing it, one is with HomeBrew and the other directly with Node.js. Automation Test Script will be running in multiple devices simultaneously using the following jars; I have tried the below implementation in Windows x86 machine. Selenium Grid from Selenium Standalone server Appium node instance TestNG If you want to test the mobile application in difference device simultaneously using the same script and single driver instance, please.

iOS Automation with Appium can only be done on Mac OS X machine so it is advisable to upgrade the OS to the latest version (which in my case is 10.12 Seirra). This can be done from the App Store.

Step 2: Create Apple Developer ID

Now you need to create your Apple Developer ID. This is required in later steps.

Step 3: Install XCode

Install the latest version of XCode available in App Store.

Step 4: Install Homebrew

Homebrew is an easy to use utility to install packages on our Mac. You need to just enter the following command in the terminal, and hit return.

Step 5: Install NodeJS

Instead of using brew to install NodeJS, it is advisable to use installer package for the latest version available here for installing NodeJS. It is a simple user friendly installer which will guide you in installation process.

Step 6: Install Appium Command Line tool

To install latest version of Appium, you need to execute the following command in the terminal.

Step 7: Download Appium Desktop

Next, download the latest version of Appium Desktop available here. We will see in detail how to use this tool later.

Step 8: Install ideviceinstaller

Install the latest version for ideviceinstaller by executing the following command in the terminal.

Step 9: Install ios-deploy

Install the latest version for ios-deploy by executing the following command in the terminal.

Step 10: Install carthage

Install the latest version for carthage by executing the following command in the terminal.

Step 11: Navigate to the bin folder

From terminal, run the following command to navigate to the bin folder where Appium is installed.

Step 12: Install Appium XCUI Driver

Install the latest version of appium-xcui-driver by executing the following command in the terminal while being on the path from the previous step.

Step 13: Finding device UDID

Connect the device to the machine via USB, then open XCode. Navigate to the menu Window → Devices. Then select your device from left panel.

Once you select your device, you should see the details as shown, You need to save the device identifier for later use.

Step 14: Open WebDriverAgent project in XCode

In order to open the project in XCode, execute the following set of commands in the terminal.

A window like this will open up.

Step 15: Enable Automatic Code Signing

We need to enable Automatic code signing and deploy the runner project on the device. This can be illustrated as below.

First, we will select WebDriverAgentLib, and select Automatically manage signing. A pop-up will appear, click on Enable Automatic.

Once you enable Auto signing, you will see Team drop down, there you need to select your Apple Developer Account from the list.

This is shown as illustrated above.

Now, select WebDriverAgentRunner from the Target list, and enable Automatic signing as done earlier. But this time you will see an Error as shown below.

In order to solve this Error, you need to modify Product Bundle Identifier under Build settings tab from com.facebook.WebDriverAgentRunner to something unique as shown below.

Now, again go to General tab to check the Error. Now you will notice that the Error is gone. Same can be seen below.

Now once, all is set we need to build the project from within XCode by clicking the play button on the top.

Step 16: Building WebDriverAgent from Terminal

Before building the project, make sure the device is plugged in to the system and you have your device UDID with you, execute the following command in the terminal.

Once above commands are executed, now execute following build command

First time when you build the project, a WebDriverAgentRunner app will be installed on the device, and the build will fail with following Error.

To solve this Error, we need to navigate to Settings ⇒ General ⇒ Device Management ⇒ , and trust the developer as shown below.

When you click on Trust button, a pop-up confirmation dialog will appear as shown below.

Now, again, if we build the project using the above command, the build will pass and a server will be started. We can confirm it by seeing the build output.

To be 100% sure if all is well with setup until now, open a separate terminal window and execute following set of commands.

You should see the following output

Phew!! That was a lot of steps we did in this post. Congratulations on setting up your machine for iPhone Automation with Appium. In the next post, we will see how to identify Elements in the iPhone app and lot more. Until then, happy testing!!!

If you find this post useful, than share it with your colleagues and friends. If you have any questions or suggestion or feedback, you can share it with me in the comments section.

  1. 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: https://github.com/appium/appium/issues/6609
    • sudo npm install -g authorize-ios
    • sudo authorize-ios
    • set java_homeReference: 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
  2. 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.

      What is the Best Backup Software for Mac? Here are the top five backup applications that MacUpdate readers rave about: 1. Is easy to use with a well-designed, intuitive interface. You select the target and destination drives, and SuperDuper! Will start backing up your data. It clones your Mac’s hard drive, so you. Bombich Software’s Carbon Copy Cloner is a more capable backup app with a more complex interface, though “Simple Mode” is also available, allowing you to back up your drive in three clicks. Significantly, the app allows you to back up your computer in an additional way: by creating an exact clone of your Mac’s hard drive. Chronosync review.

    • 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 correctlyNOTE: If 'adb' command is not found then you need to check if the path to Android sdk platform-tools is in your path.

  3. 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
        • Reference: https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingProfiles/MaintainingProfiles.html
    • 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
  4. Use correct desired capabilities: https://appium.io/slate/en/master/?ruby#appium-server-capabilities