Configure Android WebViews


For inspecting WebView elements in Testsigma, WebView debugging must be enabled within your application.

This article discusses how to inspect WebView elements in Android.

To enable WebView debugging, call the static method setWebContentsDebuggingEnabled(true) on the WebView class. Enable Debugging

NOTE:

The setting applies to all of the Android WebViews of the app.


Example React Native generated code

React Native Code


Example Java Android code

Java Code


Example Kotlin Android code

Kotlin Code

NOTE:
  • Android WebView debugging isn't affected by the state of the debuggable flag in the manifest of the app.
  • If you want to enable WebView debugging only when debuggable is true, set the flag as WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG)