Skip to main content
The MobileBoost SDK for Appium is available in Java, Python, and TypeScript. Choose your language below.

Prerequisites

Install Appium and the platform drivers:
# Install Appium
npm install -g appium

# Install drivers
appium driver install xcuitest    # iOS
appium driver install uiautomator2  # Android

Installation

Add the dependency to your pom.xml:
<dependencies>
    <dependency>
        <groupId>io.mobileboost.gptdriver</groupId>
        <artifactId>gptdriver-client</artifactId>
        <version>2.2.0</version>
    </dependency>
</dependencies>

Configuration

Replace your Appium driver classes with the MobileBoost subclasses and add your API key as a capability:
import io.mobileboost.gptdriver.*;

UiAutomator2Options options = new UiAutomator2Options();
options.setCapability("gptdriver:apiKey", "YOUR_API_KEY");

// Use GptDriverAndroid instead of AndroidDriver
AndroidDriver driver = new GptDriverAndroid(
    new java.net.URL("http://127.0.0.1:4723"),
    options
);
You can also pass additional context to enhance AI behavior:
GptDriverAndroid driver = new GptDriverAndroid(
    new java.net.URL("http://127.0.0.1:4723"),
    options,
    "When asked about Location Permissions, grant it."
);

Start the Appium server

Before running tests, start the Appium server:
appium