public final class AccessibilityTreeSnapshot

  1. Object
  2. AccessibilityTreeSnapshot
Immutable accessibility tree for the current form.

Methods

public long getGeneration()
public List<Long> getRootIds()
public Map<Long, AccessibilityNodeSnapshot> getNodes()
public AccessibilityNodeSnapshot getNode(long id)
public AccessibilityNodeSnapshot getNodeByIdentifier(String identifier)Finds a node by its application-supplied stable identifier.
public AccessibilityNodeSnapshot getNodeAt(int x, int y)Returns the deepest semantic node containing the screen coordinate.
public String toJson()

Inherited methods

Method details

getGeneration

public long getGeneration()

getRootIds

public List<Long> getRootIds()

getNodes

public Map<Long, AccessibilityNodeSnapshot> getNodes()

getNode

public AccessibilityNodeSnapshot getNode(long id)

getNodeByIdentifier

public AccessibilityNodeSnapshot getNodeByIdentifier(String identifier)
Finds a node by its application-supplied stable identifier.

Parameters

identifier String
identifier assigned with AccessibilityNode#setIdentifier(String)

Returns

the matching node, or null when no node has that identifier.

getNodeAt

public AccessibilityNodeSnapshot getNodeAt(int x, int y)
Returns the deepest semantic node containing the screen coordinate.

toJson

public String toJson()