Workflow Automation

Visual node-based workflow editor with 30+ step types. Build complex automation flows with conditional branching, variables, sub-workflows, and step-by-step debugging.

Visual Workflow Editor

Overview

Visual Editor

Drag-and-drop node canvas with auto-layout, minimap, and snap-to-grid.

30+ Step Types

Tap, swipe, element actions, app control, key events, variables, branching, and more.

Step-by-Step Debug

Pause, resume, and step through workflows one node at a time.

Session Integration

Start and end Gaze sessions within workflows for automated test reporting.

Workflow List

The left sidebar (250px) shows all saved workflows:

  • Click to select and load into the editor
  • Double-click the name to rename inline
  • Delete button with confirmation
  • + button to create a new workflow (auto-creates a Start node)
  • Running workflows show a spinning indicator

Visual Node Editor

Visual node editor with connected workflow steps

The main canvas area uses React Flow for a node-graph editing experience:

  • Dot-grid background with snap-to-grid (15px)
  • Minimap in the bottom-right corner
  • Zoom controls — Zoom in/out/fit
  • Auto-layout — Vertical (top-to-bottom) or Horizontal (left-to-right) using dagre algorithm

Node Appearance

Each node is a 280px-wide card showing:

  • Step type icon and name
  • Type-specific summary (e.g., coordinates, selector, package name)
  • Lightning bolt button for single-step execution
  • During execution: primary-color glow effect on the active node

Connections

Nodes are connected via color-coded edges:

  • Success — Green arrow for normal flow
  • Error — Orange/red arrow for error handling
  • Branch nodes have: True, False, and Error outputs

Node Deletion

Delete nodes with Backspace or Delete. The Start node cannot be deleted. When a node is deleted, incoming edges are automatically reconnected to outgoing targets to preserve the flow.

Step Types (30+)

Steps are organized into 9 categories in the tool panel:

Coordinate Actions

StepDescription
tapTap at specific screen coordinates (x, y)
swipeSwipe between two coordinates with duration

Element Actions

StepDescription
click_elementClick a UI element found by selector
long_click_elementLong-press a UI element
input_textType text into a UI element
swipe_elementSwipe from a UI element in a direction

Wait & Assert

StepDescription
wait_elementWait for a UI element to appear
wait_goneWait for a UI element to disappear
waitWait a fixed duration (milliseconds)
assert_elementAssert a UI element matches expectations
scroll_toScroll until an element is found

Flow Control

StepDescription
branchConditional branching (True/False/Error outputs)
set_variableSet a workflow variable (supports arithmetic)
read_to_variableRead a UI element's attribute into a variable
run_workflowExecute another workflow as a sub-workflow

App Actions

StepDescription
launch_appLaunch an app by package name
stop_appForce-stop an app
clear_appClear app data and cache
open_settingsOpen app's system settings page

Key Events & Screen

key_back, key_home, key_recent, key_power, key_volume_up, key_volume_down, screen_on, screen_off

Script & ADB

StepDescription
scriptRun a named automation script
adbExecute a raw ADB command

Session Control

StepDescription
start_sessionStart a Gaze session with configurable logcat, recording, proxy, and monitor
end_sessionEnd the current session with a status (completed / error / cancelled)

Step Configuration

Step configuration drawer with fields and element selector

Click a node to open the 450px edit drawer on the right. All changes are auto-saved.

Common Fields (All Steps)

FieldDescription
NameOptional label for the step
TimeoutMaximum execution time (ms, default: 5000)
LoopRepeat count (default: 1)
Pre WaitDelay before execution (ms)
Post DelayDelay after execution (ms)
On ErrorStop or Continue

Element Selector

Element-based steps use selectors to find UI elements:

  • Text — Match by visible text
  • Resource ID — Match by resource-id attribute
  • Content Desc — Match by accessibility description
  • Class — Match by Java class name
  • XPath — XPath expression for complex matching
  • Bounds — Direct bounding rectangle

An Element Picker button (crosshair icon) opens a modal to select elements directly from the device screen.

Conditional Branching

The branch step evaluates a condition and follows the True or False path:

ConditionDescription
existsCheck if a UI element matching the selector exists
not_existsCheck if a UI element does NOT exist
text_equalsCheck if element text exactly matches expected value
text_containsCheck if element text contains expected substring
variable_equalsCheck if a workflow variable equals expected value

Variables

Workflows support key-value variables that can be set, read, and used in step configurations.

  • Define variables — Click the "Variables" button (gear icon) in the toolbar to open the editor
  • Use in steps — Reference variables with {{variableName}} syntax (autocomplete available)
  • set_variable — Set a variable to a value (supports arithmetic: {{count}} + 1)
  • read_to_variable — Read a UI element's text/id/class into a variable
  • Runtime display — During execution, all variable values are shown in the runtime context panel

Execution & Debugging

ButtonDescription
RunSave and execute the workflow on the selected device
PausePause execution between steps
ResumeContinue from the paused position
Step NextExecute only the next step, then re-pause
StopForce-stop the workflow

Runtime Context Panel

While a workflow is running, a floating panel shows:

  • Workflow name and paused state
  • Progress bar with percentage
  • Current step name and type
  • Live variable values

Single Step Execution

Click the lightning bolt button on any node (except Start) to execute just that one step independently — useful for testing individual actions.

List View

Toggle between Canvas (visual) and List view using the button group in the toolbar. The list view shows steps in linear execution order with drag-and-drop reordering.

More Features