GptDriver
Constructor
| Parameter | Type | Description |
|---|---|---|
apiKey | String | Your MobileBoost API key |
nativeApp | XCUIApplication | The app instance to test |
cachingMode | CachingMode | Caching strategy (.none, .fullScreen, .interactionRegion) |
testId | String | Identifier for the test (used for caching and logging) |
additionalUserContext | String | Context to guide AI behavior across all steps |
enableSelfHealing | Bool | Enable/disable self healing globally |
AI commands
execute
Execute a natural language instruction on the current screen.assert
Verify a condition without taking action. Throws on failure.extract
Extract information from the current screen.Session URL
The SDK creates a session URL for each test run, accessible via:gptDriver.sessionURL: public propertyonSessionCreatedcallback: for real-time access- XCTest Attachments: saved as a
.weblocfile in test results - OS Logs: logged at
.noticelevel
Retrieving in CI
The session URL is saved as an XCTest attachment namedGPTDriver Session URL Link with lifetime .keepAlways. Extract it from the .xcresult bundle in your CI pipeline.
