openatx / uiautomator2

Android Uiautomator2 Python Wrapper
MIT License
6.26k stars 1.36k forks source link

dump_hierarchy显示的元素不完整 #930

Closed kitezzzGrim closed 2 months ago

kitezzzGrim commented 7 months ago

代码如下 import uiautomator2 as u2 import time d = u2.connect() hierarchy_info = d.dump_hierarchy() print(hierarchy_info)

测试页面如下

Snipaste_2023-12-22_17-59-43

此时的dump_hierarchy()输出只有一部分,没有下面的人格测试MBTI、抑郁测试症状啥的

Snipaste_2023-12-22_18-06-12 image

只有最上面的充电、WLAN元素啥的,这个是获取不到中间小程序的元素么

kitezzzGrim commented 7 months ago

补充 我发现应该是 uiautomator dump 提示killed

image
SeansuHappy commented 3 months ago

我在很久之前就发现了这个问题,但是很遗憾没有解决;目前我现在的解决方案是 是用微信7.0.7版本的客户端,这个版本是可以完美抓取到公众号列表的所有元素

codeskyblue commented 3 months ago

群里有网友说可以在android加个webenhanced flag解决,如果可以的话,估计很快就能解决

codeskyblue commented 2 months ago

已增加,目前看起来还好。华为P40,微信最新版本 image