Virtual device testing for Android hangs for all tests

I’m trying to run our Espresso test suite through the “Virtual device testing for Android” build step, but the tests hang on an “Accept terms” screen of Chrome (see screenshot).
We’re opening a browser when the user needs to authenticate, these tests run fine on local devices.

This is blocking all of our Espresso tests.

Hi @tdekoning!

Sorry to hear about this issue. Can you please send us a related build’s URL an make sure to enable Support Access so we can investigate?

The build url is this: Bitrise - Mobile Continuous Integration and Delivery - iOS & Android Build Automation

It seems that it occurs once the browser is opened. In our case we need to open the browser to authenticate the user, locally our tests run properly, but these terms & conditions ruin the fun :frowning:

I hope this is something that will get resolved by either Google or Bitrise, but i have made a work-around for getting past these screens:

val device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
device.wait(Until.hasObject(By.pkg("com.android.chrome").depth(0)), 1000)

device.findObject(UiSelector().textContains("Accept")).click()
device.findObject(UiSelector().text("No thanks")).click()

If you want multi-language support in your tests, simply move the texts (“Accept” and “No thanks”) to a strings.xml and add your translations.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.