Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我也在使用monkeyrunner dump -VF选项来列出所有 ID 和位置。现在我需要 webview 控件中的所有控件的 ID 和名称。是否可以使用 monkeyrunner 或如何获取这些控件来获得它。
首先,如果您dump从AndroidViewClient >= 4.0.0运行(如您所愿),则不应将monkeyrunner其用作解释器,而是将python.
dump
monkeyrunner
python
只是:
$ ./dump -VF
在支持 shebang 的操作系统上,或
python dump -VF
在一个不那么幸运的操作系统上。
dump转储所有的 android 视图及其属性,所以不幸的是,现在不可能在 WebView 内部进行挖掘,也许将来可以添加此功能,但它应该依赖于与用于获取 View 层次结构的技术不同的技术。