title: How to get input type of edittext in Espresso Testing?
body: <p>I have a toggle <code>button</code> in my password <code>editText</code> which makes it's input type either text or password depending on what is checked. I am able to perform the typing and clicking the toggle button but I am not sure which should be the ViewAssertion in the espresso matcher function. </p>
  
  <p>My code looks like below.</p>
  
  <pre><code>@Test
      public void checkToggleButton(){
          String password="anuran123";
  
          onView(withId(R.id.passET)).perform(typeText(password), closeSoftKeyboard());
  
          onView(withId(R.id.visibilityToggle)).perform(click());
  
          onView(withId(R.id.passET)).check(matches(allOf(/*NOT SURE WHAT TO DO HERE AS isDiplayed() won't work here.*/)))
      }
  </code></pre>