title: How to access elements on external website using Espresso
body: <p>Using espresso, we click a Login button which launches an external website (Chrome Custom Tab) where you can login and then it redirects back to our android application.  </p>
  
  <p>Is there a way in Espresso to:<br>
  1) Verify the correct URL is being launched<br>
  2) Access the elements on the website so that I can enter the login information and continue to login</p>
  
  <p><a href="https://i.stack.imgur.com/GyFyH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GyFyH.png" alt="enter image description here"></a></p>
  
  <p>When I try viewing it in the Espresso Launch Navigator, nothing shows up for the page, and if I try to record, it doesn't pick up on me entering anything on the page.</p>
  
  <p>This is what I have so far (it is in Kotlin (not Java)):
  <a href="https://i.stack.imgur.com/krt27.png" rel="noreferrer"><img src="https://i.stack.imgur.com/krt27.png" alt="enter image description here"></a></p>
  
  <p>And here is the error that gets displayed:
  <a href="https://i.stack.imgur.com/vTVVH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vTVVH.png" alt="enter image description here"></a></p>
  
  <p>It launches my application, select the login button, opens the website but then it isn't able to access the elements. </p>
  
  <p>I also tried:</p>
  
  <p><a href="https://i.stack.imgur.com/WI0IH.png" rel="noreferrer"><img src="https://i.stack.imgur.com/WI0IH.png" alt="enter image description here"></a></p>
  
  <p>Update: This is using Chrome Custom Tabs (not a Web View) so Espresso Web is not working. </p>