简体   繁体   中英

Chrome Remote Debugging - how to inspect elements in hybrid app (webview)

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...)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM