-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Is it possible to add a way to change the root of the DataMatcher? #821
Comments
Maybe https://developer.android.com/reference/androidx/test/espresso/matcher/RootMatchers ? |
Do you if there's any other way to find elements on popups? |
Have you tried to use -android viewmatcher locators? |
so, potentially this does not help, but you could use the below in an espresso session: |
After v2.11.0 is is possible to provide root matchers to |
I don't know if I should reopen this issue or create a new one. [debug] [EspressoDriver@8d20 (f832bd3b)] Matched '/session/f832bd3b-3a58-4794-ae71-9c1d0bab2867/element' to command name 'findElement' I think it's trying to find element in the old scope. Is it possible to add the scope to the DataMatcher as well? Also, I think there is an error on ViewFinder.kt line 184:
The scope should be Matcher? to allow nullable, shouldn't it? |
Could you provide the full stack trace? |
Also feel free to provide fixes - I don't have a possibility to test changes with a real app |
That's all I have, how do I get the full stacktrace? [EspressoDriver@8d20 (f832bd3b)] Got response with status 500: {"id":"565faf9b-8b19-42c9-a18d-270daa081f92","sessionId":"e0831ec4-9e99-4e80-8b99-262e681d7e17","value":{"error":"unknown error","message":"androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: Looked for element with View androidx.appcompat.widget.AppCompatTextView{1616b22 V.ED..... ........ 0,0-996,168 #7f0a0392 app:id/text_view}\n\nView Hierarchy:\n+>DecorView{id=-1, visibility=VISIBLE, width=1080, height=1920, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(0,0)(fillxfill) sim={adjust=resize} ty=BASE_APPLICATION wanim=0x10302fe\n fl=LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS\n pfl=NO_MOVE_ANIMATION FORCE_DRAW_STATUS_BAR_BACKGROUND FIT_INSETS_CONTROLLED\n bhv=DEFAULT\n fitSides=}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, chil... |
#824 should (probably) do the job |
#825 should enable |
Both PRs were published in driver version 2.12.0 |
basically setting the |
I'm trying to select a item on the dropdown of an AutoCompleteTextView. First I tried with the UiAutomator2, but there was nothing available there to make it work, then I tried with this library, but I stopped at the same point. I made it work running Espresso directly on my app, but I needed to use the method inRoot(isPlatformPopup()), which isn't available here, is it possible to add a way to call it?
I tried to call the inAdapterView, but I think it's 2 different things, and it didn't work.
The text was updated successfully, but these errors were encountered: