Skip to main content

# Text Element Capture

Text Element Capture collects text, buttons, inputs, and other UI elements that the system can recognize on the current device screen. It is useful for generating script code for clicking, typing, scrolling, and checking whether a page contains certain text.

## Ways to Open It​

- Open `Picker Workbench`, then switch to the `Text Elements` page.
- Right-click a target device in the device list and choose `Text Element Capture`. This opens the Text Elements page and selects that device.

## Capture the Current Page​

Before capturing, make sure the device is on the app page you want to inspect. You can operate the device from the remote control panel or directly on the device. The device must be online and support text element capture.

1. Click `Settings` in the upper-right of the panel.
2. Under `Capture Device`, click `Select Device`. If a development test device is already selected, you can choose `Current Development Test Device`.
3. Click `Capture Text Elements`.
4. After capture completes, the screenshot and element boxes appear on the left, while the hierarchy and details appear on the right.
5. Move over the screenshot or hierarchy tree to inspect element bounds, then click an element to pin the selection.
6. In the detail panel, choose an action and click `Copy Code`.

Capture results are kept as tabs. When capturing different screens, switch between result tabs, reorder them, or close older results.

## Choose an Action​

Common choices:

- To tap a button, choose `Click`.
- To check whether a page contains certain text, choose `Exists`.
- To type into an input field, choose `Input Text` or `Set Text`.
- To clear an input field, choose `Clear Text`.
- To move through a list or page, choose `Scroll`.
- To only locate the element first, choose `Find`.

For ordinary scripts, start with `Copy Code`. Use `Copy Match Fields` only when you want to assemble conditions yourself. `Copy JSON` is mainly for troubleshooting or sharing details with maintainers, not the first choice for day-to-day script writing.

If the same element needs several consecutive actions, switch the generation mode to reuse the element reference. For a single click or check, keep the default mode.

## When Capture or Click Fails​

- Capture failed: click `Retry`, and confirm that the device is online and the page is not changing constantly.
- Result is empty: confirm that the page actually has system-recognizable text or controls. If it does not, use Color Picker coordinates and colors instead.
- Element bounds are inaccurate or generated clicks miss the target: capture the current page again, then adjust `Hit Grid` in settings. If needed, enable `Force Hit` and capture again.
- The device is not supported: switch to a device that supports text element capture, or use the Color Picker for positioning.