poco.freezeui.hierarchy module
- class FrozenUIDumper[源代码]
-
Partially implementation of IDumper. This is only a helper that helps to make dumper work with local nodes just like with remote nodes. The local nodes is an implementation of
AbstractNode
locally with fixed hierarchy data in arbitrary data type. In a word, this class is not going to crawl hierarchy from target app, but to perform like a ordinary dumper.- dumpHierarchy(onlyVisibleNode=True)[源代码]
- 返回:
json serializable dict holding the whole hierarchy data
- 返回类型:
dict
- getRoot()[源代码]
Dump a hierarchy immediately from target runtime and store into a Node (subclass of
AbstractNode
) object.- 返回:
- Each time a new node instance is created by latest hierarchy
data.
- 返回类型:
inherit from AbstractNode
- class FrozenUIHierarchy(dumper, attributor=None)[源代码]
-
Locally implementation of hierarchy interface with a given dumper and all other behaviours by default. As all information can only be retrieve from a fixed UI hierarchy data created by dumper and all UI elements are immutable, this class is called frozen hierarchy. With the help of this class, only very few of the methods are required to implement. See
AbstractNode
or poco-sdk integration guide to get more details about this.This class makes it much easier to integrate poco-sdk and optimizes performance in some situations, but it is not sensitive enough to the changes of UI hierarchy in the app. For example, you should call
select
explicitly to re-crawl a new UI hierarchy when some UI elements changed on screen. Otherwise you are using attributes that are out of date.