dtmilano / AndroidViewClient

Android ViewServer and ADB client
Apache License 2.0
1.62k stars 347 forks source link

Find a child of a view in python UiAutomator API (without specifying view text or content description) #262

Closed nicktgn closed 1 year ago

nicktgn commented 5 years ago

Is it possible to search child views inside another view (UiObject or UiObject2) using python API?

Something like these two java functions of UiAutomator java API:

OR

If this is not currently possible, is there any way to find a view inside the collection, if this view's text or description is unknown and the ID is not unique? Specific use case: find a particular view in a list and do assertion on its text.

This feature would be very useful. Thanks in avance

dtmilano commented 1 year ago

https://github.com/dtmilano/CulebraTester2-public/commit/4d494f244479d3f7f065aaa5910b5fcc76f33554