Skip to main content

Hierarchy API


Description

IDroidHierarchyAPI Hierarchy

Provides access to the tree of interface elements on the current device screen. It's used to get the UI structure, which is an XML tree of all elements and their relationships.


Methods

Get the current screen's XML tree.

string GetLayout()

Example

var xml = instance.DroidInstance.Hierarchy.GetLayout(); // Get the current device screen XML