Skip to main content

Hierarchy API

Description

IDroidHierarchyAPI provides access to the UI element tree of the current device screen. Used to retrieve the UI structure as an XML tree of all elements and their relationships.


Methods

GetLayout

  • string GetLayout()
    Returns the XML tree of the current screen.

    Returns:
    An XML string with the UI element hierarchy.

Example

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