Espresso driver - NoActivityResumedException

Hi,
On launch my app loads a login screen in chrome browser and after sign-in the user is redirected to the app. I using espresso driver with Appium and i get the following error in Appium when trying to interact with the login screen

Encountered internal error running command: ProxyRequestError: Could not proxy command to remote server. Original error: 500 - “{“id”:“b146647a-f59a-4a1e-9b91-0b7adff0a9c5”,“sessionId”:“206f8a67-bec5-4ce1-b360-1b51a9c2bd6c”,“value”:{“error”:“unknown error”,“message”:“androidx.test.espresso.NoActivityResumedException: No activities in stage RESUMED. Did you forget to launch the activity. (test.getActivity() or similar)?”,“stacktrace”:“androidx.test.espresso.NoActivityResumedException: No activities in stage RESUMED. Did you forget to launch the activity. (test.getActivity() or similar)?\n\tat dalvik.system.VMStack.getThreadStackTrace(Native Method)\n\tat java.lang.Thread.getStackTrace(Thread.java:1567)\n\tat androidx.test.espresso.base.DefaultFailureHandler.getUserFriendlyError(DefaultFailureHandler.java:96)\n\tat androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:59)\n\tat androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:322)\n\tat androidx.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:178)\n\tat androidx.test.espresso.ViewInteraction.perform(ViewInteraction.java:119)\n\tat io.appium.espressoserver.lib.viewaction.ViewGetter.getRootView(ViewGetter.java:79)\n\tat io.appium.espressoserver.lib.model.SourceDocument.toStream(SourceDocument.kt:153)\n\tat io.appium.espressoserver.lib.model.SourceDocument.toXMLString(SourceDocument.kt:217)\n\tat io.appium.espressoserver.lib.handlers.Source.handleInternal(Source.kt:27)\n\tat io.appium.espressoserver.lib.handlers.Source.handleInternal(Source.kt:23)\n\tat io.appium.espressoserver.lib.handlers.RequestHandler$DefaultImpls.handle(RequestHandler.kt:28)\n\tat io.appium.espressoserver.lib.handlers.Source.handle(Source.kt:23)\n\tat io.appium.espressoserver.lib.handlers.Source.handle(Source.kt:23)\n\tat io.appium.espressoserver.lib.http.Router.route(Router.kt:218)\n\tat io.appium.espressoserver.lib.http.Server.serve(Server.kt:49)\n\tat fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)\n\tat fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)\n\tat java.lang.Thread.run(Thread.java:762)\n”}}”
[debug] e[35m[MJSONWP (d7a8a09b)]e[39m at JWProxy.proxy (C:\Users\shreeja_murugesan\AppData\Local\Programs\Appium\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:213:13)

Can anyone please help me with this?

I also would like to know if espresso driver can interact with other apps/system apps like notifications pane and permission pop-ups or it can only access the AUT. I am new to espresso and its quite confusing.

@mykola-mokhnach

https://developers.perfectomobile.com/pages/viewpage.action?pageId=31101694

Espresso is limited to the application sandbox. It is not possible to access any apps except of the one, which is under test.

1 Like