Skip to content

Automation: interacting with the page

Commands that click, fill, type, drag and read element state by snapshot reference.

View Markdown

Commands, flags and values are literal — they are not translated. All of them accept the target flags --page/--node/--workspace described in Automation: navigation, and without a target they act on the active tab of the current workspace.

The reference comes from the snapshot

The element commands use --element <ref>, and those refs come from elyra snapshot.

  • Take the snapshot, use the refs on the same page.
  • After navigating or changing the page, the old refs no longer apply — take a new snapshot.
  • The CLI recommends, after each action, taking a new snapshot to check what actually settled.

Actions by reference

Command Use
elyra click --element <ref> Click
elyra dblclick --element <ref> Double click
elyra hover --element <ref> Hover
elyra focus --element <ref> Focus
elyra fill --element <ref> --value <text> Clear and fill
elyra type --input <text> Type at the current focus
elyra select --element <ref> --value <value> Choose a dropdown option
elyra check --element <ref> / elyra uncheck --element <ref> Check / uncheck a box or radio
elyra clear --element <ref> Clear the field’s content
elyra select-all --element <ref> Select all text in the field
elyra keypress --key <name> Press a key (Enter, Tab, Escape, ArrowDown…)
elyra drag --from <ref> --to <ref> Drag from one element to another
elyra upload --element <ref> --files <path,...> Send local files to a file input

Requirements: fill and select require --value; drag requires --from and --to; upload requires --files; keypress requires --key. check and uncheck are the same parameterized handler.

clear erases without undo. upload sends files from your disk to the page — check what is going and where.

Fill several fields at once

elyra fill-form (--fields '<json>' | --fields-file <path>) [--page <id>] [--workspace <selector>] [--json]
  • --fields is a JSON array in the form [{"element":"<ref>","value":"<text>"}], with refs from snapshot.
  • --fields and --fields-file are mutually exclusive; providing both is an error.
  • Every field is reported: the result says what landed and what failed. Use elyra snapshot --json to check.
  • An invalid or empty file fails.

Read state and property

Command What it returns
elyra get --what text|html|value|url|title|count|box [--element <ref>] Element property — or the page’s, when the property is the page’s
elyra is --what visible|enabled|checked --element <ref> Element state
elyra find --locator <type> --value <text> --action <action> Finds by semantic locator and performs the action
elyra highlight --selector <ref> Highlights the element
elyra scrollintoview --element <ref> Scrolls to the element
elyra inserttext --text <text> Inserts text without key events

inserttext does not fire keydown or keyup. Pages that react to key events do not behave as if you had typed — for those cases, use real typing.

Low-level mouse

elyra mouse move --x <n> --y <n> [--page <id>] [--workspace <selector>] [--json]
elyra mouse down [--button <left|right|middle>] [--page <id>] [--workspace <selector>] [--json]
elyra mouse up [--button <left|right|middle>] [--page <id>] [--workspace <selector>] [--json]
elyra mouse wheel --dy <n> [--dx <n>] [--page <id>] [--workspace <selector>] [--json]
  • mouse move requires --x and --y; mouse wheel requires --dy, with --dx optional.
  • The coordinates are absolute on the page and depend on the current viewport. Without a recent snapshot, the target can miss — on pages with scrolling, the target moves without warning.