Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Mobile integration

Mikołaj Mański edited this page Jul 15, 2016 · 3 revisions

Mobile support

Android

You can use Appium tool alongside Bobcat to run your tests on Android mobile devices (real and emulated).

Scope

Appium supports selenium-compatible mobile browser automation. It allows us to navigate through objects, follow links, fill in forms etc. Mobile browser automation does not support touch gestures. Currently it can be done only for native Android applications. If you want to automate native android applications using touch gestures see this test from appium java-client: https://github.com/appium/java-client/blob/master/src/test/java/io/appium/java_client/android/AndroidGestureTest.java

Prerequisites

Configure webdriver properties

# +++ Appium + Android +++
webdriver.type=appium
webdriver.appium.url=http://127.0.0.1:4723/wd/hub
# this setting is ignored for Android but it is required
webdriver.cap.deviceName=Galaxy Tab 2
# fetch your device id using command "adb devices" from android sdk
webdriver.cap.udid=device id
webdriver.cap.platformName=Android
webdriver.cap.platformVersion=4.4
webdriver.cap.browserName=Chrome

Make sure you use proper deviceName as returned by adb devices. Bobcat tests should now run mobile device.

Running tests using Android emulator

Before you run a test using android emulator you should create an android virtual device profile using the avd tool from Android SDK. If you wish to use Chromium browser on your emulated android device you have to fetch latest version from http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html?prefix=Android/ and install it on the emulator using adb install CHROMIUM-PACKAGE-NAME

Configure web-driver as follows:

# +++ Appium + Android Emulator +++
webdriver.type=appium
webdriver.cap.automationName=Appium
webdriver.appium.url=http://127.0.0.1:4723/wd/hub
# this setting is ignored for Android but it is required
webdriver.cap.deviceName=emulator-5554
# Name of the android virtual device to launch
webdriver.cap.avd=Test1b
webdriver.cap.avdLaunchTimeout=600000
webdriver.cap.avdReadyTimeout=600000
webdriver.cap.newCommandTimeout=360
webdriver.cap.platformName=Android
webdriver.cap.platformVersion=4.4
webdriver.cap.app=Chromium
webdriver.cap.browserName=Chromium
webdriver.mobile=true

Make sure you use proper avd (Android device name). The emulator should be started automatically by appium if it is not running. Bobcat tests should now run mobile device.

iOS

You can create a universal Appium instance that handles both iOS and Android devices. You will need java jdk, ant and Android sdk.

./reset.sh --ios --real-safari --code-sign "iPhone Developer: Dev (ID)" --profile profileHash --verbose --force --android --chromedriver-version 2.11

Properties

Use following webdriver.properties in your project to run the tests on iPhone:

# +++ Appium + iOS +++
webdriver.type=appium
webdriver.appium.url=http://127.0.0.1:4723/wd/hub
webdriver.cap.deviceName=iPhone
webdriver.cap.udid=device id
webdriver.cap.platformName=iOS
webdriver.cap.platformVersion=7.1.0
webdriver.cap.browserName=Safari
webdriver.mobile=true

Getting started with Bobcat

  1. Getting started

AEM Related Features

  1. Authoring tutorial - Classic
  1. AEM Classic Authoring Advanced usage
  1. Authoring tutorial - Touch UI
Clone this wiki locally