Skip to content

FindNode Templates & Filters

Fresh

Templates control which nodes are initially included in the search scope. The default template is TP:more.

Available Templates

TemplatePurpose
TP:allAll nodes on screen
TP:moreMost visible nodes (default)
TP:basicCommon interactive elements
TP:reducedMinimal node set
TP:findTextText-containing nodes
TP:anyTextAny node with text property
TP:textInputEditable text fields
TP:lineLinear layout items (e.g., navigation bars)
TP:appNavBarApp navigation bar items
TP:scrollableScrollable containers

Template Usage

javascript
// Get all text input fields
device.sendAai({ query: "TP:textInput", action: "getIds" });

// Get navigation bar labels
device.sendAai({ query: "TP:appNavBar,labels", action: "getText" });
// Returns: { count: 5, retval: ['Alarms','World Clock','Timers','Stopwatch','Bedtime'] }

// Get bottom line items
device.sendAai({ query: "TP:line,bottom,-1", action: "getText" });

Boolean Property Filters

Use BP: prefix to filter by element state:

FilterMeaning
BP:clickableElement can be clicked
BP:editableElement accepts text input
BP:checkableElement is a checkbox/toggle
BP:checkedElement is currently checked
BP:selectedElement is selected
BP:enabledElement is enabled
BP:scrollableElement can scroll

Combining Filters

javascript
// Clickable buttons with text
device.sendAai({ query: "BP:clickable&&C:Button", action: "getText" });

// Selected navigation item
device.sendAai({ query: "TP:appNavBar&&BP:selected", action: "getText" });

// Editable fields that are enabled
device.sendAai({ query: "BP:editable&&BP:enabled", action: "getIds" });

Node Properties

Each node has these searchable properties:

PropertyDescription
IDUnique identifier on current screen
Package NameApp package (e.g., com.sigma_rt.sigmatestapp)
Class NameUI class (e.g., .Button, .EditText)
Resource IDLayout resource ID
BoundsScreen position [left,top][right,bottom]
TextDisplayed text content
Boolean Propertiesclickable, enabled, checkable, checked, etc.

Limitations

  • Portrait mode only — limited landscape support
  • Limited horizontal scrolling — vertical scrolling works best
  • No multi-threading — sequential query execution
  • Incomplete WebView support — some apps like Facebook and YouTube have custom rendering

Unofficial documentation. Source: sigma-rt.com