View decor = getActivity().getWindows().getView()
ArrayList<View> views = new ArrayList<>();
for (View v : TreeIterables.breadthFirstViewTraversal(decor)) {
views.add(v);
}
--
You received this message because you are subscribed to the Google Groups "Android Testing Support Library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-testing-suppo...@googlegroups.com.
To post to this group, send email to android-testing...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-testing-support-library/1be24128-7e2a-46fb-b049-deae71abf567%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Espresso no matching view exception: android.support.test.espresso.NoMatchingViewException: No views in hierarchy found matching: with content description: is "Highscore, Open navigation drawer" If the target view is not part of the view hierarchy, you may need to use Espresso.onData to load it from one of the following AdapterViews:com.android.internal.view.menu.ExpandedMenuView{3450462 VFED.VC.. .F...... 12,12-387,84 #102032a android:id/expanded_menu} View Hierarchy: +>DecorView{id=-1, visibility=VISIBLE, width=399, height=84, has-focus=true, 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, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} | +->ExpandedMenuView{id=16909098, res-name=expanded_menu, visibility=VISIBLE, width=375, height=72, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=true, is-focusable=true, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=12.0, y=12.0, child-count=1} |Could you guys elaborate a bit on what you're trying to do and what you're asking? I, for one, am not clear on what you're getting at here. Like "I'd like to dynamically decide what views to click." What does that mean and why do you need this?
On Fri, Apr 14, 2017 at 12:49 AM <spangebo...@gmail.com> wrote:
Any ideas? same issue here--
On Monday, April 10, 2017 at 2:19:35 PM UTC-6, pezh...@gmail.com wrote:Hi,I'd like to dynamically decide what views to click. So I did thisView decor = getActivity().getWindows().getView()ArrayList<View> views = new ArrayList<>();
for (View v : TreeIterables.breadthFirstViewTraversal(decor)) {
views.add(v);
}But after I printed out the views array, it is actually a different view hierarchy as Espresso generates.This is especially true when a dialog pops up, Espresso will be able to find the correct view hierarchy however my way fails.Any idea?
You received this message because you are subscribed to the Google Groups "Android Testing Support Library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-testing-support-library+unsubscribe@googlegroups.com.
To post to this group, send email to android-testing-support-lib...@googlegroups.com.