Ramble01 / android-test-kit

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

onData cannot find ListPopupWindow in AutoCompleteTextView #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create an Activity that includes an AutoCompleteTextView
2. Add an adapter with AutoCompleteTextView#setAdapter() 
3. Try to find an item with onData()

What is the expected output? What do you see instead?
The item should be found. Instead, an Exception is thrown:

com.google.android.apps.common.testing.ui.espresso.NoMatchingViewException: No 
views in hierarchy found matching: is assignable from class: class 
android.widget.AdapterView
....
at dalvik.system.VMStack.getThreadStackTrace(Native Method)
at java.lang.Thread.getStackTrace(Thread.java:579)
at 
com.google.android.apps.common.testing.ui.espresso.base.DefaultFailureHandler.ge
tUserFriendlyError(DefaultFailureHandler.java:69)
at 
com.google.android.apps.common.testing.ui.espresso.base.DefaultFailureHandler.ha
ndle(DefaultFailureHandler.java:40)
at 
com.google.android.apps.common.testing.ui.espresso.ViewInteraction.runSynchronou
slyOnUiThread(ViewInteraction.java:159)
at 
com.google.android.apps.common.testing.ui.espresso.ViewInteraction.doPerform(Vie
wInteraction.java:90)
at 
com.google.android.apps.common.testing.ui.espresso.ViewInteraction.perform(ViewI
nteraction.java:73)
at 
com.google.android.apps.common.testing.ui.espresso.DataInteraction.load(DataInte
raction.java:135)
at 
com.google.android.apps.common.testing.ui.espresso.DataInteraction.perform(DataI
nteraction.java:112)
at com.example.tests.MyTest.testOnData(MyTest.java:50)
at java.lang.reflect.Method.invokeNative(Native Method)
at 
android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
at 
android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
at 
android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTes
tCase2.java:192)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
at 
android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:55
4)
at 
com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunne
r.onStart(GoogleInstrumentationTestRunner.java:167)
at 
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1701)

What version of the product are you using? On what operating system?
1.1-r3 (via Jake Wharton's double-espresso: 
'com.jakewharton.espresso:espresso:1.1-r3'); Mac OS X

Original issue reported on code.google.com by shapiro...@gmail.com on 7 Jul 2014 at 6:23

GoogleCodeExporter commented 9 years ago
Scratch that, 
https://code.google.com/p/android-test-kit/wiki/EspressoSamples#Using_inRoot_to_
target_non-default_windows seems to describe a solution

Original comment by shapiro...@gmail.com on 8 Jul 2014 at 7:05

GoogleCodeExporter commented 9 years ago

Original comment by vale...@google.com on 19 Nov 2014 at 10:09