Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: container's Child element is taken from next container if child not exists #903

Open
instasck opened this issue Aug 7, 2023 · 5 comments

Comments

@instasck
Copy link

instasck commented Aug 7, 2023

So I am having an Instagram tool.
I am reading the all "containers" and getting full name using a child.
image
this is the way i do it:
containers = self.device(resourceId='com.instagram.android:id/follow_list_container')
Now when I reach the "sh__roseeeasd" container
image

for i in range(1, 6):
    user_info_view = container.child(index=1)
    user_info_view.child(resourceId="com.instagram.android:id/follow_list_subtitle")

the fullname_view.get_text() is:
image
image

instead of return EMPTY / NOT FOUND.

Why is that ? the child should be only from parent !

SIMILAR:
#877
#262

@instasck
Copy link
Author

No response ? no one maintain this repo ?

@instasck
Copy link
Author

instasck commented May 4, 2024

THIS BUG HAPPEN 100% OF TIMES ! SUPER IMPOORANT TO FIX.

@codeskyblue
Copy link
Member

Have you tried the latest version

@instasck
Copy link
Author

instasck commented May 8, 2024

I am using uiautomator2 2.16.26, did not see any update on change_log

@codeskyblue
Copy link
Member

recommend using xpath instead of UiSelector

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants