Android UI automation controls Android applications by identifying interface elements such as buttons, text fields, labels, and other UI nodes instead of depending only on fixed screen coordinates.
This approach is useful when the same automation workflow must run across Android devices with different screen sizes, resolutions, or layouts. With Total Control FindNode, an automation workflow can locate a UI element, build a query for it, and then perform actions such as clicking, entering text, reading content, or checking element properties.
This article focuses specifically on UI element-based Android automation with FindNode. For a broader overview covering scripts, APIs, multi-device control, and general real-device workflows, see the Android Automation guide.
Android automation is a broad topic. It can include launching applications, installing APK files, running JavaScript, triggering operations through REST APIs, controlling multiple devices, performing coordinate-based clicks, and finding Android UI elements.
Android UI automation is narrower. Its main purpose is to identify what is currently displayed in the Android interface and interact with specific UI elements.
For example, instead of telling an automation script:
Click(500, 800)
you can define a workflow such as:
Find "Login" button
↓
Click the button
The first method depends on where the button appears. The second method depends on what the UI element is. That distinction becomes important when the same application runs on several Android devices.
Coordinate automation uses an X/Y location on the screen. This can work well in a controlled environment where the device model, screen resolution, orientation, and application layout remain unchanged.
Problems appear when those conditions change.
Device A
1080 × 2400
Device B
720 × 1600
A button displayed near the bottom of Device A may appear at a different coordinate on Device B.
Fixed-coordinate automation can therefore be affected by:
FindNode addresses this problem by locating UI elements before executing an operation rather than assuming that the target is always at the same coordinate.
FindNode is a Total Control feature for locating Android UI elements and performing operations on them.
A basic workflow looks like this:
Android App
↓
UI Explorer
↓
Find UI Element
↓
Create Query
↓
Execute Action
The key difference is that the automation first identifies the target element.
For example, an Android application may contain a button with:
Text: Login
Class: Button
Instead of recording the button's current screen position, you can create a query describing the UI element and use that query when the automation runs.
Before creating a FindNode query, you need to understand the UI elements available on the current Android screen. Total Control provides UI Explorer for this purpose.
UI Explorer can inspect an Android screen and display information associated with individual UI nodes.
| UI Property | What It Describes |
|---|---|
| Text | Text displayed by the UI element |
| Resource ID | Identifier assigned to the Android view |
| Class Name | Type of Android UI element |
| Description | Accessibility or descriptive information |
| Bounds | Position and dimensions of the element |
You do not necessarily need every property in a query. The goal is to identify enough reliable information to distinguish the target element from other elements on the screen.
Navigate to the application screen containing the element you want to automate. For example, a login screen may contain a username field, password field, Login button, and Forgot Password link.
Open UI Explorer and inspect the target element. For example:
Text: Login
Class Name: Button
Resource ID: login_button
The available information depends on the application.
Use the element properties to construct a FindNode query. The query represents the element you want the automation to locate when it runs.
UI Properties
↓
Query
↓
Find Matching Node
You are describing the target instead of recording only its coordinates.
Verify that the query returns the intended element. This step matters because a property such as Button alone may match several elements.
Once the correct UI node has been located, the automation can perform an operation on it.
Find Login Button
↓
Click
or:
Find Text Field
↓
Enter Text
Suppose an application contains Login, Confirm, Submit, or Next buttons. Instead of assigning a fixed position to each button, the automation can locate the intended UI element first.
Find Button
↓
Click
UI automation can locate an editable field and then enter information.
Find EditText
↓
Set Text
This is useful for:
FindNode does not have to perform a click. It can also be used to retrieve UI information.
Find Text
↓
Get Text
↓
Verify Result
FindNode can be used to inspect UI properties such as whether an element is enabled, checked, or visible.
Find Node
↓
Check Properties
↓
Continue Based on Result
Some UI elements are not visible immediately. For a long page or scrolling list:
Scroll
↓
Find Element
↓
Execute Action
The automation can combine scrolling with element detection rather than assuming that the target will always appear at a fixed Y coordinate.
Finding a UI node is only the first part of the workflow. After the target is identified, the automation can execute an action.
Typical operations include:
A typical model is:
Query
↓
Find Node
↓
Action
↓
Result
FindNode can also be used as part of Android UI testing.
Install APK
↓
Launch App
↓
Find UI Element
↓
Execute Test
↓
Verify Result
This pattern can be applied to:
The main advantage over a purely coordinate-driven test is that the workflow can locate the intended interface element at runtime instead of assuming that the target always appears at the same X/Y position.
A single FindNode action may be enough for a small task. More complex workflows usually require several operations to be connected together.
Total Control can combine FindNode with JavaScript-based automation.
JavaScript
↓
FindNode Query
↓
Action
↓
Check Result
↓
Next Automation Step
A complete login workflow could look like:
Launch App
↓
Find Username Field
↓
Enter Username
↓
Find Password Field
↓
Enter Password
↓
Find Login Button
↓
Click
↓
Find Result
↓
Verify Text
The important point is that UI-element queries can become reusable building blocks inside larger Android automation scripts.
UI-element automation becomes especially useful when the same application workflow needs to run on several Android devices.
Device 1
Device 2
Device 3
↓
Find Login Button
↓
Execute Action
If every phone uses a different screen size, the Login button may not have the same X/Y coordinate on each device. An element-based workflow can instead identify the corresponding UI element on each device.
Combined with Total Control's Multi-Device Control Center, FindNode can be used as part of multi-device Android UI automation workflows.
This can be useful for:
For a broader discussion of scripts, APIs, and multi-device Android automation architecture, see the Android Automation guide.
| Method | How It Finds the Target | Main Advantage | Best Fit |
|---|---|---|---|
| Coordinate Automation | Uses X/Y screen position | Simple and direct | Stable layouts and similar devices |
| FindNode UI Automation | Finds a UI element from its properties | Less dependent on fixed positions | Different resolutions, UI testing, element-based workflows |
Coordinate automation:
FindNode:
Use UI element-based automation when:
Coordinates can still be useful when:
The two methods do not have to be mutually exclusive. A practical automation workflow can use element-based operations where reliable UI nodes are available and coordinate actions where a fixed screen position is appropriate.
This keeps the debugging process manageable. Instead of building a complete script first and then trying to discover why it fails, you validate the UI element and query before using it in a larger workflow.
Android UI automation identifies and interacts with Android interface elements such as buttons, text fields, and labels instead of relying only on fixed screen coordinates.
Android automation is a broad category that can include scripts, APIs, application launching, APK installation, and multi-device operations. Android UI automation focuses specifically on identifying and interacting with elements displayed in the Android interface.
FindNode is a Total Control feature for locating Android UI elements through queries and then obtaining information or performing actions on matching nodes.
UI Explorer can expose properties such as text, Resource ID, Class Name, Description, Bounds, and other node information that can be used to construct a FindNode query.
FindNode provides a more flexible approach when UI elements move because of different resolutions or layouts. Coordinate automation can still be useful for fixed and predictable interfaces.
Yes. FindNode can be combined with multi-device workflows so corresponding UI elements can be located and operated across several Android devices.
For a broader introduction to real-device scripting, APIs, and multi-device workflows, read Android Automation.
To explore UI-based Android control and automation, visit Total Control – Control Android from PC.