teoincontatto / android-test-kit

Automatically exported from code.google.com/p/android-test-kit
0 stars 0 forks source link

scrollTo() is not working? #127

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Use this code to scroll and click on Aboutdevice option in Settings. 
onView(allOf(withId(android.R.id.title),withText("About 
device"))).perform(scrollTo(),click()); 
2.
3.

What is the expected output? What do you see instead?

It should scroll and click on Aboutdevice option in Settings application.

What version of the product are you using? On what operating system?
We are using Ubuntu 11 and espresso2.0,hamcrest,dagger1.2

Please provide any additional information below.

But is giving following error: 
android.support.test.espresso.NoMatchingViewException?: No views in hierarchy 
found matching: (with id: android:id/title and with text: is "About device") 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?:android.widget.ListView?{419d2900 VFED.VC. .F...... 0,10-373,418 
#102000a android:id/list} - android.widget.ListView?{41a5c0f0 VFED.VC. ........ 
0,0-542,410 #102000a android:id/list}

View Hierarchy: +>DecorView?{id=-1, visibility=VISIBLE, width=1024, height=552, 
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}

Thanks in advance, Can any one tell me that why scrollTo() is not working? 

Original issue reported on code.google.com by u.sadasi...@gmail.com on 29 Jan 2015 at 9:45

GoogleCodeExporter commented 9 years ago
Next time, this type of question is better suited for android-test-kit-discuss 
group than a bug report.

If this is the full stack trace then it may be that Espresso is targeting a 
different window (e.g. a popup). You'll need to look at the test run (or get 
screenshots) to confirm. To work around it, see 
https://code.google.com/p/android-test-kit/wiki/EspressoSamples#Using_inRoot_to_
target_non-default_windows

Original comment by vale...@google.com on 16 Mar 2015 at 7:35