Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
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]"));
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.7k users

Browse Categories

...