Example

Inside the test file

  1. Import necessary dependencies

import io.mobileboost.gptdriver_ktl.GptDriver
  1. Create the GPT Driver instance and start the session

sdkInstance = GptDriver(
    apiKey = "<YOUR_API_KEY>",
    deviceName = "Emulator",
    platformVersion = "N/A",
    additionalUserContext = "",
    cachingMode = "INTERACTION_REGION", // Other options: "NONE", "FULL_SCREEN"
    testId = "",
    composeTestRule = composeTestRule
)
  1. Use execute method to perform AI-driven steps:

sdkInstance.execute("Tap on the home button and verify it leads to the main screen")

Simple test example:

Last updated