I am trying to automate Gmail app for Android. In the "Compose" page, the part of the body of the message is a webview context. Using uiautomatorviewer i managed to retrieve the locator of the "body" element, but sending text to it - fails. Trying to switch context to "WEBVIEW" (i am using Appium) also fails. I wish to inspect elements in this page using chrome remote debugging. On my computer, i navigated to chrome://inspect/#devices and i launched the application on the android emulator. It looks alright.
But when i try to inspect elements, i see none.
What am i missing? (i made sure the to enable debugging and become a developer...)
Asked
Active
Viewed 787 times
0

Nisim Naim
- 151
- 1
- 15
1 Answers
0
To enable WebView debugging setWebContentsDebuggingEnabled
should be set on the WebView class. You need to make this change in your app code and rebuild it.
Following these instructions was good enough for me

dmle
- 3,498
- 1
- 14
- 22
-
The app i am trying to automate is not my app, so i don't have access to the code of the app. As i wrote in my question, the app is Gmail for Android. – Nisim Naim Jul 27 '20 at 17:28
-
1Then I don't see a way for you to make it work: it is expected to disable debugging in production builds, but for testing purpose you must have it turned on – dmle Jul 28 '20 at 13:30
-
Thank you very much for you answer and comment. – Nisim Naim Jul 28 '20 at 16:50
-
I think this will help @NisimNaim . I havnt tried it yet https://blog.speedfox.co.uk/articles/1524219174-android_webview_hackery/ – Mustafa Apr 12 '22 at 22:47