ui_node

class ui_node.UINode(element, parent: UINode | None = None)[source]

Bases: object

A class to represent a UI node in an Android UI hierarchy.

add_child(child: UINode) None[source]

Adds a child node to this node.

Parameters:

child – The child UINode to add.

tree(level: int = 0) str[source]

Returns a string representation of the node tree.

Parameters:

level – The current level in the tree, defaults to 0.

Returns:

A string representation of the node tree.