Hey all :wave: We are working on E2E tests using A...
# compose-ios
m
Hey all 👋 We are working on E2E tests using Appium for a KMP app (Android/iOS) with Jetpack Compose UI. On Android, everything works fine — We can locate elements using
testTag
. But on iOS, Appium Inspector just shows a bunch of nested
XCUIElementTypeOther
elements — nothing is accessible via
accessibilityId
, XPATH, etc. We tried adding
Modifier.semantics { contentDescription = "..." }
alongside
testTag
, built the Compose framework with
./gradlew linkDebugFrameworkIosSimulatorArm64
, added it to Xcode (Embed & Sign), cleaned DerivedData, and rebuilt the app. Still, the elements aren’t exposed in Appium or Xcode Accessibility Inspector. Anyone got Compose-based elements discoverable on iOS for Appium? Are we missing something? Does anyone have an example of the repository where accessbility ID for iOS can be viewed using Appium Inspector? Attached screenshot of how the PoC app looks like in Appium Inspector for Android and iOS app.
👀 2
a
Hi, what's the Compose version you're using?
m
Hi @Andrei Salavei, thanks for your reply. We are using
compose-multiplatform = "1.7.3"
. If it matters, other dependency versions from
gradle/libs.versions.toml
file are:
Copy code
agp = "8.9.1"
android-compileSdk = "35"
android-minSdk = "24"
android-targetSdk = "35"
androidx-activity-compose = "1.10.1"
androidx-lifecycle = "2.8.4"
coilCompose = "3.1.0"
compose-multiplatform = "1.7.3"
decompose = "3.3.0"
essenty = "2.5.0"
koinCore = "4.0.2"
kotlin = "2.1.20"
kotlinx-coroutines = "1.10.1"
kotlinx-serialization = "1.8.0"
kotlinxDatetime = "0.6.2"
ktorClient = "3.1.1"
multiplatformSettings = "1.3.0"
sqlDelight = "2.0.2"
supabase = "3.1.3"
a
There 2 things might be: Be sure you're enabled the accessibility using the correct
AccessibilitySyncOptions
for ComposeUIViewController. Consider migrating to the latest 1.8.0, which is beta for now - it has significant improvements in accessibility (and UI testing).
m
Thanks Andrei, we will try that.
👀 1
Using Maestro but same requirement I believe