Basic Configuration for Mobile GUI
SHAFT uses Appium under the hood for mobile automation. Configure the properties below to target a local Appium server or a cloud device farm.
tip
- Set up your Appium server following the official Appium documentation.
- For cloud execution without managing your own devices, consider BrowserStack or LambdaTest.
Common Properties (Android & iOS)
src/main/resources/properties/custom.properties
# Address of your Appium server (default for local)
executionAddress=localhost:4723
# Target platform: ANDROID or IOS
targetOperatingSystem=ANDROID
# Automation driver — UiAutomator2 or Espresso for Android, XCUITest for iOS
mobile_automationName=UiAutomator2
Android Native App
src/main/resources/properties/custom.properties
# Install a fresh APK before each run (recommended)
mobile_app=src/test/resources/apps/MyApp.apk
# Device name as reported by `adb devices`
mobile_deviceName=Pixel_7_API_34
# Android version (optional but recommended)
mobile_platformVersion=14.0
Alternatively, launch an already-installed app by package/activity (not recommended for clean test runs):
src/main/resources/properties/custom.properties
mobile_appPackage=com.example.android.myApp
mobile_appActivity=.MainActivity
iOS Native App
src/main/resources/properties/custom.properties
targetOperatingSystem=IOS
mobile_automationName=XCUITest
# .app bundle for Simulator, .ipa for real device
mobile_app=src/test/resources/apps/MyApp.app
# Device name as shown in Xcode device list
mobile_deviceName=iPhone 15
mobile_platformVersion=17.0
# UDID required for real device
mobile_udid=00008110-001A23456789AB01
Mobile Web (Browser on Device)
For mobile browser testing, configure the same properties as Web GUI and add the mobile target:
src/main/resources/properties/custom.properties
executionAddress=localhost:4723
targetOperatingSystem=ANDROID
mobile_automationName=UiAutomator2
mobile_browserName=Chrome
mobile_deviceName=Pixel_7_API_34
baseURL=https://m.example.com
tip
You can learn more about the different property types and the full list of supported properties by visiting the related pages.