Open smiley-yoyo opened 8 years ago
We also faced similar issue. If you set compressed=False, it will only effect the XML dump, but not the selector. Am I right?
No. In my situation, set compressed=False also effect the selector.
You are right. It is working fine for selectors also. thanks
@wicked-wei @hongbinbao We also faced similar issue. My situation is like that
Note: uiautomator: 0.2.7 latest release
supplement: Only part of the phone appears the phenomenon, you can ignore the phenomenon, thank you!
By testing some app, I notice that sometimes I can see ui on screen, but uiautomator can't find the uiobject. When I dump window hierarchy to xml using code, seeing thing are difference from what I dump from adb uiautomatorviewer tool. The xml dumped from code, lesser element than dumped from uiautomatorviewer. I find out that the dump difference is cause by the compressed argument. And, if I set compressed to false, the uiobject can be found by uiautomator again. I guess what I need is setCompressedLayoutHeirarchy method, but it is not expose by uiautomator. After review the server code I think I can use dump(compressed=False) to do this. So, can it be a good idea to explicitly set compressed layout hierarchy on or off? Thank you very much.