{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"What is a View Tree?","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"what-is-a-view-tree","__idx":0},"children":["What is a View Tree?"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["view tree"]}," (also known as a UI hierarchy or DOM tree) is a structured representation of all the visual elements currently displayed on an Android device's screen. It is the foundation for how MoreLogin RPA locates and interacts with on-screen elements."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-it-works","__idx":1},"children":["How It Works"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When an Android app renders its UI, the system creates a hierarchical tree of ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["View"]}," objects. Each node in this tree represents a UI element — buttons, text fields, images, containers, etc."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"FrameLayout\n├── LinearLayout\n│   ├── TextView (\"Welcome\")\n│   └── EditText (input field)\n├── RecyclerView\n│   ├── ViewHolder[0]\n│   │   ├── ImageView (app icon)\n│   │   └── TextView (\"Chrome\")\n│   └── ViewHolder[1]\n│       ├── ImageView (app icon)\n│       └── TextView (\"Gmail\")\n└── FrameLayout\n    └── Button (\"OK\")\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["MoreLogin RPA uses the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Android Accessibility Service"]}," to capture this tree, converting it into a JSON structure that your workflow can query."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"element-properties","__idx":2},"children":["Element Properties"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each element in the view tree exposes these key properties:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Property"},"children":["Property"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Visible text displayed by the element"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"Chrome\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resourceId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Android resource ID (also called ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fullId"]},")"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"com.android.launcher3:id/icon\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["className"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Android view class name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"android.widget.TextView\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["contentDescription"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Accessibility description (used for screen readers)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"Chrome\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["packageName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Package name of the app owning this element"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"com.android.launcher3\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bounds"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Object"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Screen coordinates ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{top, right, bottom, left}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{\"top\":261,\"right\":540,...}"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["centerX"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["centerY"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Center point coordinates of the element"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["405"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["441"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isClickable"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether the element responds to tap events"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isEnabled"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether the element is interactive"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isVisibleToUser"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether the element is currently visible on screen"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["childCount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number of child elements"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["index"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Position index among sibling elements"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["2"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"how-rpa-uses-the-view-tree","__idx":3},"children":["How RPA Uses the View Tree"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"finding-elements","__idx":4},"children":["Finding Elements"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/rparobotic-process-automation/03-node/01-simulation-operations/03-find-element"},"children":["Find Element"]}," node queries the view tree using filter conditions:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Filter Condition"},"children":["Filter Condition"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Example"},"children":["Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Match by visible text"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text"]}," Equals ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"Chrome\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fullId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Match by resource ID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fullId"]}," Equals ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"com.android.launcher3:id/icon\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["class"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Match by view class"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["class"]}," Equals ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"android.widget.Button\""]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["desc"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Match by content description"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["desc"]}," Contains ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"Search\""]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"interacting-with-elements","__idx":5},"children":["Interacting with Elements"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once an element is found, you can:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Tap it"]}," — using the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/rparobotic-process-automation/03-node/01-simulation-operations/04-tap-element"},"children":["Tap Element"]}," node"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Extract data"]}," — using the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/rparobotic-process-automation/03-node/02-data-processing/01-run-js-script"},"children":["Run JS Script"]}," node to read properties like ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["contentDescription"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Loop over multiple elements"]}," — using the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/rparobotic-process-automation/03-node/03-flow-logic/02-loop"},"children":["Loop"]}," node to iterate through a list of found elements"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"inspecting-the-view-tree","__idx":6},"children":["Inspecting the View Tree"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Developer Tools"]}," in MoreLogin RPA to inspect the view tree of any cloud phone screen in real time:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open the cloud phone in MoreLogin"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Go to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["RPA → Developer Tools"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The view tree panel shows all elements on the current screen"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click any element to see its properties (text, resourceId, bounds, etc.)"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more about Developer Tools, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/rparobotic-process-automation/02-using-rpa/04-developer-tools"},"children":["Developer Tools"]},"."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"tips","__idx":7},"children":["Tips"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resourceId"]}," for stable matching"]},": Text content may change across languages or app updates, but ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resourceId"]}," values are usually stable."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Combine multiple conditions"]},": Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["text"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["class"]}," together when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resourceId"]}," is not available."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Check ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isVisibleToUser"]}]},": Elements may exist in the tree but be off-screen. The Find Element node only returns visible elements by default."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Wait for elements"]},": Screens may take time to load. Use the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Maximum Wait Time"]}," parameter in Find Element to poll until the element appears."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"related","__idx":8},"children":["Related"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/rparobotic-process-automation/03-node/01-simulation-operations/03-find-element"},"children":["Find Element"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/rparobotic-process-automation/03-node/01-simulation-operations/04-tap-element"},"children":["Tap Element"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/rparobotic-process-automation/02-using-rpa/04-developer-tools"},"children":["Developer Tools"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/rparobotic-process-automation/05-appendix/01-supported-field-types"},"children":["Supported Field Types"]}]}]}]},"headings":[{"value":"What is a View Tree?","id":"what-is-a-view-tree","depth":1},{"value":"How It Works","id":"how-it-works","depth":2},{"value":"Element Properties","id":"element-properties","depth":2},{"value":"How RPA Uses the View Tree","id":"how-rpa-uses-the-view-tree","depth":2},{"value":"Finding Elements","id":"finding-elements","depth":3},{"value":"Interacting with Elements","id":"interacting-with-elements","depth":3},{"value":"Inspecting the View Tree","id":"inspecting-the-view-tree","depth":2},{"value":"Tips","id":"tips","depth":2},{"value":"Related","id":"related","depth":2}],"frontmatter":{"seo":{"title":"What is a View Tree?"}},"lastModified":"2026-06-10T12:03:09.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/rparobotic-process-automation/05-appendix/02-what-is-a-view-tree","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}