I used UIAutomatoViewer tool and it has a webview named as android.webkit.WebView, I am able to see a WebView and a lot of View children appended to it, which relate to each one of the elements inside the app. But when I try to catch it via below code it returns only NATIVE_APP as an output, hence I am not able to switch to WebView.
Set allContext = driver.getContextHandles();;
System.out.println(allContext.size());
for (String context : allContext) {
System.out.println(context);
if (context.contains(“WEBVIEW”))
driver.context(context);
}
How can we access that particular WebView and all its objects?