0 Shares 1171 Views 1 Comments

Setting up Mobile Automation Project in MacOS

Oct 09, 2017
1171 Views 1
Mobile Automation

Using Katalon Studio, mobile tester can design automation test for both Android and iOS to run on physical devices, cloud services and emulators.

This tutorial explains how to setup a mobile automation project for Katalon Studio in macOS. It assumes that you are familiar with general principles of automated testing and have minimal knowledge of the Katalon Studio IDE.

Setup Prerequisites

Katalon Studio requires latest installation of Appium, Node.js. Please setup as following steps:

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

brew install carthage

  • Install node and npm with Homebrew:

brew install node

brew install npm

Note: To make sure Node.js is installed correctly, you can open a new terminal and type which node to see if system can find it.

  • Install Appium with npm

npm install -g appium

  • Set Appium Directory to “/usr/local/lib/node_modules/appium” in Katalon Preferences (from Katalon menu, go to Preferences > Katalon > Mobile)


You will need to install and configure Xcode in case of testing on iOS devices. Please set up Xcode as following:

  • Open Xcode > Preferences > Accounts: Add developer’s Apple ID

  • Open Terminal at WebDriverAgent in Appium directory folder: <…>/appium/node_modules/appium-xcuitest-driver/WebDriverAgent and enter following command to initialize WebDriverAgent project:

mkdir -p Resources/WebDriverAgent.bundle

sh ./Scripts/bootstrap.sh -d

  • Open project WebDriverAgent.xcodeproj within folder WebDriverAgent in Xcode.

  • Select target WebDriverAgentLib, in the Signing section, check Automatically manage signing and select the team.

  • Then on the menu bar, select Product > Build

Mobile Automation

  • Repeat the last two steps for WebDriverAgentRunner
  • Build WebDriverAgent to verify all above steps worked

xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=<udid>’ test

Where: <udid> is the device UDID

  • In case this dialog is displayed, select Always Allow.

  • You should be able to see Listening on USB as the last line on build output.

2. Setup Devices

For Android devices:

  • Turn on the phone’s developer mode (go to Settings > Developer options).
  • Connect your Android Phone to your computer via a USB cable. Just confirm if prompted for accepting/trusting the phone.

For iOS devices:

  • Connect your iOS Devices to your computer via a USB cable. Just confirm if prompted for accepting/trusting the phone.
  • For iOS 8 and higher, you must enable the service UI automation on the device (connect the iOS device to Xcode) as following steps:
    1. plug in the iOS device
    2. open Xcode on Mac
    3. go to Settings on the iOS device > Developer > turn ON UIAutomation
  • For iOS 6 and higher, on your iOS device, go to Settings > Safari > Advanced and enable Web Inspector
  • To test an iOS native application file (.ipa or .app file), make sure the application file is already built and signed properly to deploy on the device. Follow these steps to check if an application file is already built and signed correctly:
    1. Open Xcode and navigate to Window/Devices
    2. Choose your device from the Devices list
    3. Press the “+” button and choose your application file

    1. If installed successfully, the application will appear in the Installed Apps section as shown below

Desired Capabilities

You can modify extra Desired Capabilities when executing automation test in Katalon Studio.

To define Desired Capabilities for local execution using Chrome, Firefox, IE, Safari or Edge, please access Project > Settings > Execution > Default > Mobile > iOS (or Android)

The example below show a desired capabilities settings for Android to enable Unicode input.

Screen Shot 2017-07-12 at 10.29.24.png

Refer to https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities to know which properties of each web browser are supported by Selenium. For desire capabilities to be used with Appium, refer to this list: http://appium.io/slate/en/master/?ruby#appium-server-capabilities.

4. External Library

With this setting, you can manage your external libraries by adding new ones or remove existing ones. Please access the settings at menu Project > Settings > External Libraries.

Screen Shot 2017-07-13 at 10.24.07.png

  • Add: Click to add your external libraries. The selected libraries will be copied to Drivers folder of Katalon project
  • Remove: Click to remove existing libraries. They will be removed from Drivers folder in Katalon project

The added libraries can be imported and utilized in the Script View of Katalon Studio:

You may be interested

UFT Patch Updates – UFT 14.03
Unified Functional Testing
1870 views1
Unified Functional Testing
1870 views1

UFT Patch Updates – UFT 14.03

Saket - Mar 11, 2018

Post the launch of UFT 14.0, there are three patch updates has been released including a number of features and enhancement. Recently Micro Focus unveiled third patch…

Setting up Web Service Automation Project
Katalon Studio
Katalon Studio

Setting up Web Service Automation Project

Saket - Oct 24, 2017

Web services are specific services that can be published and called over the Internet by client applications. Katalon Studio supports functional testing of web services. This topic…

UFT Jenkins Integration
Unified Functional Testing
Unified Functional Testing

UFT Jenkins Integration

Saket - Oct 03, 2017

In our earlier post, we got to know the easy integration of UFT with GIT. This post focuses on integration of UFT and Jenkins. I have also…

One Comment

  1. Pingback: Testing Bits – 10/8/17 – 10/14/17 | Testing Curator Blog

Leave a Comment

Your email address will not be published.

Most from this category

Join The Growing Group of 15000+ Test Automation Engineers

Signup for our newsletter and get access to free downloads, as well as tips, tricks and techniques and various test automation resources.
Email Address
Secure and Spam free...