appium / appium-uiautomator2-server

Appium UiAutomator/UiObject2-based server for Android UI automation. This module is used by appium-uiautomator2-driver component
Apache License 2.0
318 stars 226 forks source link

Can't detect elements that have deep depth #516

Open yoshitaka-ogata opened 1 year ago

yoshitaka-ogata commented 1 year ago

Hello!

I encountered a problem that can't detect elements that have a deep depth. This app's element max depth is around 90. This element was prohibited to detect by DEFAULT_MAX_DEPTH limitation.

I would like to add either feature

  1. Increase the DEFAULT_MAX_DEPTH value from 70 to 100 or above. https://github.com/appium/appium-uiautomator2-server/blob/3725babe3f7e13cb6be3e9b8c9ffffc0ea000ccb/app/src/main/java/io/appium/uiautomator2/model/UiElementSnapshot.java#L59
  2. Add snapshotMaxDepth capabilities like iOS. https://appium.github.io/appium-xcuitest-driver/4.19/settings/
mykola-mokhnach commented 1 year ago

I would prefer option # 2

yoshitaka-ogata commented 1 year ago

Thank you for your reply! I'll try to add snapshotMaxDepth.