Issue
I have a web view which loads another web view with in. The structure follows as below:
- Web view (name_1)
- View
- View
- Web view (No Name)
Going through the UI test I end up needing to click an element in the inner web view after it gets created. As it doesn't have a name, how am I able to access that web view to click the element?
Usually I would do the below using the named web view as an example
onWebView(R.id.name_1)
.withNoTimeout()
.withElement(findElement(...))
.perform(webClick())
Solution
I would try to use allOf
and isDescendantOfA
to get the child WebView.
Try this:
onWebView(allOf(
withClassName(containsString(WebView.class.getSimpleName())),
isDescendantOfA(withId(R.id.name_1)))
).withNoTimeout().withElement(findElement(...)).perform(webClick());
Answered By - jeprubio
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.