Could not access the provide web context. ensure that the AndroidWebView is debuggable uipath

I saw there is a solution - but I don’t know here I need to declare this or what specifically I need to do, can someone please help me with this ?

Could not access the provided web context

Description: Could not access the provided web context. Ensure that the Android WebView is debuggable. More information can be found by going to Chrome DevTools  |  Chrome for Developers.

Remedies:

I wrote a detailed answer some time ago. See if this brings more clarity! Mobile Device Automation error - could not access the provided web context - #9 by phaserescu

@phaserescu
Thanks
My problem right now is that I’m trying through an app.
I saw it, I tried to enter both parts:
Remote debugging WebViews
And also to Remotely debug Android WebViews
I saw this
https://developer.android.com/reference/android/webkit/WebView.html#setWebContentsDebuggingEnabled(boolean)
But I don’t quite understand where I need to set and what exactly.

You have to call that method in the application code. After that you need to recompile the app and the resulting apk should have debuggable webviews enabled!

You can find many examples of how to do this on existing apps on github:

  1. android-chat/uikit/src/main/java/wendu/dsbridge/DWebView.java at 71f2b517c5e6d0471298cd80d8356c9727a5d4c0 · wildfirechat/android-chat · GitHub
  2. Anki-Android/AnkiDroid/src/main/java/com/ichi2/utils/WebViewDebugging.kt at b8eb59fe8602d9c57e28eac0b7a8da830929d925 · ankidroid/Anki-Android · GitHub

Edit: added examples