Skip to main content

Deep links

Deep links let you skip the normal navigation flow and land directly on a specific screen - useful for focused tests that don't need to traverse the entire UI.

Pass the deepLink parameter to androidTest, iosTest, or the generic appiumTest. The harness creates the driver session, executes the Appium mobile: deepLink command with the correct platform parameters, and then runs the test body.

Android

@Test
fun product_details() =
androidTest(app = MyAndroidApp, deepLink = "myapp://product-details/1") {
on(::ProductDetailsScreen) {
titleText() shouldBe "Sauce Labs Backpack"
}
}

The harness sends mobile: deepLink with url and package (from AndroidApp.appPackage).

iOS

@Test
@Test
fun product_details() =
iosTest(app = MyIosApp, deepLink = "myapp://product-details/1") {
on(::ProductDetailsScreen) {
titleText() shouldBe "Sauce Labs Backpack"
}
}

The harness sends mobile: deepLink with url and bundleId (from IosApp.bundleId).

Cross‑platform

@Test
fun product_details_android() = appiumTest(
app = MyApp,
driverFactory = MyApp.androidDriverFactory,
deepLink = "myapp://product-details/1",
) {
on(::ProductDetailsScreen) {
// test body
}
}

@Test
fun product_details_ios() = appiumTest(
app = MyApp,
driverFactory = MyApp.iosDriverFactory,
deepLink = "myapp://product-details/1",
) {
on(::ProductDetailsScreen) {
// test body
}
}

For CrossPlatformApp, the platform is resolved at runtime from the driver type - Android drivers send package, iOS drivers send bundleId.

Prerequisites

  • The app must be configured to handle the deep link scheme (Android intent filters / iOS universal links or custom URL schemes).
  • appPackage (Android) or bundleId (iOS) must be set on the app definition - the deep link command needs it to target the correct app.
  • The Appium server (or cloud provider) must support the mobile: deepLink extension.