abeatte / android-test-kit

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

Typing in an AutoCompleteTextView will hang Espresso #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. In espresso run:

onView(withId(R.id.search))
        .perform(typeText("Text"))

where the view with Id is an AutoCompleteTextView. I get an error:

                        I  ----- begin exception -----
                        I  java.lang.RuntimeException: Waited for the root of the view hierarchy to have window focus and not be requesting layout for over 10 seconds. If you spe
                           cified a non default root matcher, it may be picking a root that never takes focus. Otherwise, something is seriously wrong. Selected Root:
                        I  Root{application-window-token=android.view.ViewRootImpl$W@42082240, window-token=android.view.ViewRootImpl$W@4221f450, has-window-focus=false, layout-p
                           arams-type=1000, layout-params-string=WM.LayoutParams{(36,788)(648x322) gr=#10800053 sim=#10 ty=1000 fl=#1860208 fmt=-3 wanim=0x10301ec}, decor-view-st
                           ring=PopupViewContainer{id=-1, visibility=VISIBLE, width=648, height=322, has-focus=true, has-focusable=true, has-window-focus=false, is-clickable=fals
                           e, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-conne
                           ction=false, x=0.0, y=0.0, child-count=1}}
                        I  . All Roots:
                        I  Root{application-window-token=android.view.ViewRootImpl$W@42082240, window-token=android.view.ViewRootImpl$W@4221f450, has-window-focus=false, layout-p
                           arams-type=1000, layout-params-string=WM.LayoutParams{(36,788)(648x322) gr=#10800053 sim=#10 ty=1000 fl=#1860208 fmt=-3 wanim=0x10301ec}, decor-view-st
                           ring=PopupViewContainer{id=-1, visibility=VISIBLE, width=648, height=322, has-focus=true, has-focusable=true, has-window-focus=false, is-clickable=fals
                           e, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-conne
                           ction=false, x=0.0, y=0.0, child-count=1}}
                        I  Root{application-window-token=android.view.ViewRootImpl$W@42082240, window-token=android.view.ViewRootImpl$W@42082240, has-window-focus=true, layout-pa
                           rams-type=1, layout-params-string=WM.LayoutParams{(0,0)(fillxfill) sim=#20 ty=1 fl=#1810100 pfl=0x8 wanim=0x1030299}, decor-view-string=DecorView{id=-1
                           , visibility=VISIBLE, width=720, height=1184, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focuse
                           d=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, ch
                           ild-count=1}}
                        I      at com.google.android.apps.common.testing.ui.espresso.base.RootViewPicker.get(RootViewPicker.java:80)
                        I      at com.google.android.apps.common.testing.ui.espresso.base.BaseLayerModule.provideRootView(BaseLayerModule.java:100)
                        I      at com.google.android.apps.common.testing.ui.espresso.base.BaseLayerModule$$ModuleAdapter$ProvideRootViewProvidesAdapter.get(BaseLayerModule$$Modul
                           eAdapter.java:428)
                        I      at com.google.android.apps.common.testing.ui.espresso.base.BaseLayerModule$$ModuleAdapter$ProvideRootViewProvidesAdapter.get(BaseLayerModule$$Modul
                           eAdapter.java:392)
                        I      at com.google.android.apps.common.testing.ui.espresso.base.ViewFinderImpl.getView(ViewFinderImpl.java:50)
                        I      at com.google.android.apps.common.testing.ui.espresso.ViewInteraction$1.run(ViewInteraction.java:82)
                        I      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:390)
                        I      at java.util.concurrent.FutureTask.run(FutureTask.java:234)
                        I      at android.os.Handler.handleCallback(Handler.java:730)
                        I      at android.os.Handler.dispatchMessage(Handler.java:92)
                        I      at android.os.Looper.loop(Looper.java:137)
                        I      at android.app.ActivityThread.main(ActivityThread.java:5103)
                        I      at java.lang.reflect.Method.invokeNative(Native Method)
                        I      at java.lang.reflect.Method.invoke(Method.java:525)
                        I      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
                        I      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
                        I      at dalvik.system.NativeStart.main(Native Method)
                        I  ----- end exception -----

What is the expected output? What do you see instead?
Espresso will carry on an allow more code to be run

What version of the product are you using? On what operating system?
espresso-1.0-SNAPSHOT-bundled on OS X 10.9

Original issue reported on code.google.com by oakesm9 on 12 Nov 2013 at 11:02

GoogleCodeExporter commented 9 years ago
This will be solved with multi-window support.

Original comment by vale...@google.com on 12 Nov 2013 at 6:25