mardi 28 février 2017

Android - testing Google Map info window click

I'm writing tests for my app and I'm stuck with testing GoogleMap. Clicking on Marker was easy using UiAutomator, but it seems that it's impossible to click on info window.

This is how I make test click on Marker:

UiDevice device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
UiObject marker = device.findObject(new UiSelector().descriptionContains(MARKER_TITLE));

I've tried using Android Device Monitor and dumping view hierarchy but it seems like that view (info window) isn't there.

Here is how the screen that I'm trying to test looks like: http://ift.tt/2m6IzRt

Any idea on how to click on info window using Espresso or UiAutomator?

Aucun commentaire:

Enregistrer un commentaire