title: Android - testing Google Map info window click
body: <p>I'm writing tests for my app and I'm stuck with testing <code>GoogleMap</code>. Clicking on Marker was easy using <code>UiAutomator</code>, but it seems that it's impossible to click on info window.</p>
  
  <p>This is how I make test click on <code>Marker</code>:</p>
  
  <pre><code>UiDevice device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
  UiObject marker = device.findObject(new UiSelector().descriptionContains(MARKER_TITLE));
  </code></pre>
  
  <p>I've tried using Android Device Monitor and dumping view hierarchy but it seems like that view (info window) isn't there.</p>
  
  <p>Here is how the screen that I'm trying to test looks like:
  <a href="https://i.stack.imgur.com/FuxHG.png" rel="nofollow noreferrer">https://i.stack.imgur.com/FuxHG.png</a></p>
  
  <p>Any idea on how to click on info window using <code>Espresso</code> or <code>UiAutomator</code>?</p>