-
Notifications
You must be signed in to change notification settings - Fork 40
Mobile integration
You can use Appium tool alongside Bobcat to run your tests on Android mobile devices (real and emulated).
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
- download standalone Android SDK from http://developer.android.com/sdk/index.html
- install to a custom location, i.e. C:\android-sdk. You need to choose a folder that does not contain any spaces (like C:\Program Files...). This could result in "Logcat capture failed: spawn ENOENT" or similar error.
- configure ANDROID_HOME environment variable to point to SDK location.
- add %ANDROID_HOME%\platform-tools to your system path
- download appium from http://appium.io/
- unzip appium to a folder, say c:\appium
- start console and navigate to appium folder.
- run command: "npm install appium"
- start appium server: "appium start"
- appium GUI should appear. Click the launch icon in the top-right to start the server.
- install latest device drivers, for example Samsung's driver for tablets and phones if you are using a samsung device
- enable USB debugging in device properties
- connect the device via USB
- make sure that the device is visible in android devices list. Run "adb devices" to view the list.
- on the device - allow to computer to control the device.
# +++ 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.
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.
You can create a universal Appium instance that handles both iOS and Android devices. You will 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
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
- Configuring Bobcat
- Selenium enhancements
- Cucumber enhancements
- Traffic analyzer
- Email support
- Reporting
- Cloud integration
- Mobile integration
- Executing tests on different environments
- Working with multiple threads
- Tips and tricks
- Authoring tutorial - Classic
- AEM Classic Authoring Advanced usage
- Siteadmin
- Sidekick
- Aem Component
- Working with author pages
- Working with Publish pages
- Advanced component interactions
- Working with Context Menu
- Using Aem Content Tree
- Aem Content Finder
- Storing component configurations
- Working with packages
- Jcr Support
- Authoring tutorial - Touch UI
- Adding and editing a component
- Sites management tutorial