Not new tips, but I’d like to share a small optimization config to reduce animation flakiness in the Appium UIA2 driver. Capabilities: The settings can be configured during a session via the Settings API. It means you can dynamically adjust the config by following your desired scenario. Old post below also addresses waitForIdleTimeout and waitForSelectorTimeout…More
Tag Archives: android
[Appium][maestro] compare running speed in one scenario for Android
I was curious about how Maestro is faster than Appium UIA2. I picked up a scenario from https://github.com/appium/ruby_lib_core/blob/3de46abaa933e6fa813b78192650e1f9ead5a238/test/functional/android/patch_test.rb#L38-L47, which had multiple taps and sending keys. Maestro doesn’t support Unicode, so I switched the keyword to ASCII. It took a total of 30 seconds, as shown below. This ran on an emulator on my local laptop.…More
[Appium][Android] Read NFC content in an Appium session
According to https://stackoverflow.com/questions/57202157/android-nfc-read-fails-after-fullscreen-launcher-app-comes-from-background, if a device had a running process that had WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED or WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD, reading NFC contents may fail. Appium/io.appium.settings unlocks the lock screen on the device under test in the new session creation. The old method used WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD flag to achieve it. Perhaps it caused the unsuccessful NFC content read reported in https://github.com/appium/appium/issues/17973.…More
Run Maestro on CI via HeadSpin
maestro is a new mobile automation tool for Android and iOS (simulator) created by mobile.dev. The tool is OSS with Apache License 2.0, and the company may continue leading the development. I won’t say anything about the differences etc between Appium here because they have different functionality and opinions. Users may also have several opinions…More
[Android] [INSTALL_FAILED_INSUFFICIENT_STORAGE: Scanning Failed.: Package could not be assigned a valid UID] in Android
I heard “INSTALL_FAILED_INSUFFICIENT_STORAGE: Scanning Failed” error message a couple of times. https://github.com/appium/appium/issues/13957 is probably the same message in the appium repository. The logcat was: The invalid error message was probably the below (from https://cs.android.com/android/platform/superproject/+/master:frameworks/base/services/core/java/com/android/server/pm/Settings.java;l=4096-4097?q=pm%2FSettings.java ) So, when Android already has probably over Process.LAST_APPLICATION_UID – Process.FIRST_APPLICATION_UID, it definitely handles the app id as -1. It causes…More
[Appium][Compose] testTagsAsResourceId helps Appium/UIA2
I don’t know since, but testTagsAsResourceId is available as part of androidx.compose.ui.semantics package in Compose. According to the description, the value will be available as AccessibilityNodeInfo.viewIdResourceName. This is brilliant news since UIAutomator can access the element via resource id as before, via accessibility tree-based integration test such as Appium/UIA2 driver. testTag is via extras. Now,…More
[Android] AccessibilityNodeInfo flags
Some new flags such as FLAG_PREFETCH_ANCESTORS in https://developer.android.com/reference/android/view/accessibility/AccessibilityNodeInfo since Tiramisu. I haven’t verified how they will help, but potentially Appium/UIA2 may be able to improve the performance with it…? This is my note.More
[appium] try out some settings when you cannot get expected elements
In some cases, no expected elements are in views via Appium/UIA2 driver. It has some conditions, so it is worth trying out the below settings apis. enableMultiWindows ignoreUnimportantViews allowInvisibleElements These attributes allow you to find elements via Appium/UIA2 driver. They may not be able to find via uiautomator framework via Android as general way, so…More
[Appium] Debug gesture pointer in Android
This is a tip to debug gesture actions. Android OS has many debug options in its developer tools. This tip is also one of them. In inout section, you can find Show taps and Pointer location items. They allow showing helpful debug information for gestures. They will help you to figure out how gestures work.More
[Android]Java 11 in AndroidStudio
Gradle v7 requires Java 11 to build Android apps. Android Studio bundled OpenJDK forked version for the build. You can find the version like the below path in JetBrain’s toolbox. “/Users/kazu/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-2/212.5457.46.2112.790598 3/Android Studio Preview.app/Contents/jre/Contents/Home” So, JAVA_HOME should refer to the path. Non-toolbox is in the Android Studio’s package.More