title: Android Espresso error on button click
body: <p>I'm trying to write some UI tests for an Android APP with the espresso framework.</p>
  
  <p>For now I'm just checking if all the elements are present on the splash screen and then I'm trying to click the login button.</p>
  
  <p>When the the button is clicked the test fails due to an error that I can't seem to understand why it's happening. </p>
  
  <p>My test code is</p>
  
  <pre><code>@RunWith(AndroidJUnit4.class)
  @SmallTest
  public class WelcomeTest {
  
    @Rule
    public ActivityTestRule&lt;Welcome&gt; mActivityRule = new ActivityTestRule&lt;&gt;(
            Welcome.class);
  
    @Test
    public void elements_present() {
        // Check login
        onView(withId(R.id.wv_login)).check(matches(isDisplayed()));
        // Check signup
        onView(withId(R.id.wv_signup)).check(matches(isDisplayed()));
        // Check video
        onView(withId(R.id.videoView)).check(matches(isDisplayed()));
        // Check swipe right
        onView(withId(R.id.videoView)).perform(swipeRight());
        // Check swipe left
        onView(withId(R.id.videoView)).perform(swipeLeft());
    }
  
    @Test
    public void tap_login() {
        // Tap login button
        onView(withId(R.id.wv_login)).perform(click());
    }
  
  }
  </code></pre>
  
  <p>The output I get is:</p>
  
  <blockquote>
    <p>Caused by: java.lang.RuntimeException: Action will not be performed because the target view does not match one or more of the following constraints:
    at least 90 percent of the view's area is displayed to the user.</p>
  </blockquote>
  
  <p>What does this mean and is this caused by my test approach or is it a bug on the code? The app seems to work just fine on my devices.</p>
  
  <p>PS: I have disabled the animations as the espresso documentation suggests</p>