execute_step
Execute a single Robot Framework keyword or evaluate expression in an interactive session. Capture results with variable assignment and control recording for test suite generation.
Instructions
Execute a single Robot Framework keyword (or Evaluate) within a session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "keyword" (default) or "evaluate" (runs BuiltIn.Evaluate). | keyword |
| record | No | Override the record gate that decides whether a successful step is appended to session.steps for build_test_suite output. - None (default): auto-classify. Read-only inspection keywords (Get Title, Log, etc.) are NOT recorded; everything else IS. Carve-outs that always record: ``assign_to`` is set, or a named test is currently open (after start_test). - True: force-record this step regardless of classification. - False: drop this step regardless of classification. The decision is surfaced as ``recorded: bool`` in the response. | |
| keyword | Yes | Keyword name (Library.Keyword supported). Use find_keywords to discover correct keyword names before calling. | |
| arguments | No | Keyword arguments; positional and named (`name=value`) supported. | |
| assign_to | No | Variable name(s) to assign the result to (string or list). CRITICAL: Use this to capture results for later steps. Example: assign_to="response" captures ${response} variable | |
| bdd_group | No | Optional group name for BDD keyword generation. Steps with the same bdd_group are clustered into a single behavioral keyword when build_test_suite(bdd_style=True) is called. Example: bdd_group="add product to cart" | |
| bdd_intent | No | BDD intent prefix for the group: "given", "when", "then", "and", "but". Used with bdd_group to assign Given/When/Then prefixes in the generated BDD test suite. | |
| expression | No | Expression for mode="evaluate"; falls back to keyword/first argument. | |
| session_id | No | Session to execute in; resolves default if omitted. | default |
| timeout_ms | No | Optional timeout in milliseconds for keyword execution. If not provided, uses smart defaults based on keyword type: - Element actions (Click, Fill): 5000ms - Navigation (Go To, New Page): 60000ms - Read operations (Get Text): 2000ms - API calls (GET, POST): 30000ms Set to 0 or negative to disable timeout. | |
| use_context | No | Whether to run inside RF native context; defaults via config/attach. | |
| detail_level | No | Response verbosity: "minimal" | "standard" | "full". | minimal |
| scenario_hint | No | Optional scenario text to auto-configure libraries on first call. | |
| raise_on_failure | No | If True, raise on failure; otherwise return error in payload. | |
| pre_validate_timeout_ms | No | Override the pre-validation gate's timeout for this single call. Pre-validation is the fast ~500ms-default check that verifies an element is visible / enabled before the keyword runs; it auto-retries once with a 200ms backoff on transient failures. - None (default): use ``ExecutionConfig.PRE_VALIDATION_TIMEOUT`` (500ms) for slow-loading pages this is sometimes too tight. - A positive int (e.g. 2000): extend the gate to this many milliseconds for this call only. Useful when a page legitimately takes ~1–2s to settle. - 0 or negative: skip pre-validation entirely for this call (last resort — also disables the keyword timeout). Failure responses include a ``pre_validate_timeout_hint`` entry explaining how to use this when the gate trips. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||