Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webview elements inspection for testing

We have a web view in our app which is being detected as a single webpage element (android.webkit.WebView). not showing the layout hierarchy to inspect individual UI components. I have tried to inspect the elements using 'UI Automator Viewer' and 'Appium Inspector' and same results. Is there any other tool which can be used for inspecting web views? Please advise!

like image 472
NewUser Avatar asked Apr 20 '15 16:04

NewUser


2 Answers

UIAutomatorViewer is able to see native elements only. Everything underneath WebView is web elements. You need to switch from native to web context. Link

like image 120
Kirill Avatar answered Sep 22 '22 11:09

Kirill


This functionality was broken in Android Lollipop but appears to have recently been fixed with Android System Webview v44, try upgrading webview and inspecting then

like image 37
Scott Riseborough Avatar answered Sep 19 '22 11:09

Scott Riseborough