Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Salesforce by (11.9k points)

I want to match the user name text field inside a WebView which loads the Salesforce login page (but can also be applied to any other page with text fields).

enter image description here

I have tried with:

onView(withHint("User Name")).perform(typeText("[email protected]"));

But that doesn't work. Any better idea?

1 Answer

0 votes
by (32.1k points)

This can be achieved using Espresso Web 2.2 API

onWebView().withElement(findElement(Locator.ID,"username")).perform(webKeys("[email protected]"));

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...