How to access elements on external website using Espresso

Viewed 4908

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.

Is there a way in Espresso to:
1) Verify the correct URL is being launched
2) Access the elements on the website so that I can enter the login information and continue to login

enter image description here

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.

This is what I have so far (it is in Kotlin (not Java)): enter image description here

And here is the error that gets displayed: enter image description here

It launches my application, select the login button, opens the website but then it isn't able to access the elements.

I also tried:

enter image description here

Update: This is using Chrome Custom Tabs (not a Web View) so Espresso Web is not working.

2 Answers
Related