intent_action
Execute high-level actions like click, fill, navigate, or extract, automatically mapping them to the correct keyword for the active automation library.
Instructions
Execute a high-level intent that auto-resolves to the correct library keyword.
Valid intents: navigate, click, fill, hover, select, assert_visible, extract, wait_for.
Also accepted but DEPRECATED:
extract_text — equivalent to
extractwithmode="text". Theextractverb is the canonical mode-aware getter (text / attribute / count / value / url / title) and additionally surfacesextracted_valueat the top level of the response.extract_textwill be removed in a future release; preferintent="extract"for new code.
The intent is resolved based on the session's active library (Browser/SeleniumLibrary/AppiumLibrary).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nth | No | Zero-based nth-match index. Disambiguates when multiple elements match the same locator (e.g., an id duplicated across mobile vs desktop nav). Browser library appends ``>> nth=<n>``; SeleniumLibrary appends ``:nth-of-type(<n+1>)`` for CSS locators only (other locator types are unaffected and log a debug-level warning). | |
| mode | No | For ``intent="extract"`` only. Selects what to read from the page; ignored for other intents. "text" — element text content (default) "attribute" — element attribute value (requires attribute_name) "count" — number of matching elements (multi-match OK) "value" — DOM property "value" (input values) "url" — current page URL (no target needed) "title" — current page title (no target needed) The extracted value is surfaced as ``result["extracted_value"]`` and assigned to ``assign_to`` if provided. mode="count" additionally skips pre-validation for this call — counting is the only mode where matching zero/multiple elements is the expected outcome rather than a failure. | text |
| force | No | Use when: the element is visible but Playwright reports it "blocked by another element" — overlay, sticky header, cookie-consent banner, modal backdrop, animation still running. Symptom: ``Click intercepted`` or ``element is not stable`` / ``outside of the viewport`` errors despite the element appearing correct in the ARIA snapshot. Example: a "Submit" button covered by a sticky consent banner the user can't dismiss programmatically. What it does: for a Browser-library click intent, swaps ``Click`` for ``Click With Options force=True``, which skips Playwright's actionability checks. For other libraries / intents whose mapping declares no ``force_keyword``, the flag is silently ignored. Caveat: do NOT use ``force=True`` to drive elements that are genuinely hidden (display:none, visibility:hidden) — that's an anti-pattern; the resulting click won't behave like a real user click. Prefer natural locators first; fall through to ``force=True`` only when an overlay is the genuine cause. | |
| match | No | Select-match strategy for the ``select`` intent. ``"label"`` (default) - match by visible option text. Mirrors RF semantics for ``Select Options By label``. ``"value"`` - match by ``<option value="X">`` attribute. ``"index"`` - match by zero-based integer index. ``"text"`` - synonym for ``"label"`` (most libraries). ``"auto"`` - OPT-IN heuristic. Numeric value -> ``"value"``, otherwise ``"label"``. Use with care: numeric visible labels (years, amounts) mis-route. For SeleniumLibrary, this also picks the dispatched keyword (``Select From List By Label`` / ``Value`` / ``Index``). Ignored for non-select intents. | label |
| value | No | Value for fill/select intents | |
| commit | No | Use when: the page uses Vue, React, Angular reactive forms, jQuery validate, idealForms, formvalidation.io, or any framework that gates validation on the DOM ``change`` event. Symptom: a form submit is rejected with a "required" or validation error despite every visible field appearing correctly filled; the framework's internal model still thinks the inputs are empty because Playwright's ``fill`` didn't fire a real ``change``. What it does: after a successful Browser-library FILL, dispatches a real DOM ``change`` event on the target via Browser's ``Dispatch Event`` keyword. Off by default — the follow-up is best-effort and any failure is logged and ignored (it never escalates a successful fill into a failed step). No effect for non-FILL intents, non-Browser libraries, or failed fills. | |
| intent | Yes | Action verb (e.g. "click", "navigate", "fill", "extract") | |
| target | No | Locator or URL (e.g. "#submit", "text=Login", "https://example.com"). REQUIRED for navigate/click/fill/hover/select/assert_visible/wait_for. Only optional for extract with mode="url" or mode="title". Do not pass the string "null"/"None" — that counts as no target and the call is rejected with the parameter named. | |
| options | No | Additional options (e.g. {"timeout": "10s"}) | |
| assign_to | No | Variable name to capture result (esp. useful for extract: the extracted text/count/attribute is assigned to this var). | |
| session_id | No | Session to execute against. Pass the session_id returned by analyze_scenario or manage_session(action="init") — the session that has your libraries loaded. If omitted, it is inferred ONLY when exactly one session has libraries (the response then carries a "session_note" saying which was used); with several loaded sessions the call is rejected rather than guessed at, and "default" is used only when it is genuinely the loaded one. Omitting it does NOT silently target the session you just created. | |
| detail_level | No | Response detail level | standard |
| attribute_name | No | Required when ``intent="extract"`` and ``mode="attribute"``; the HTML attribute name to read (e.g. ``"href"``, ``"data-testid"``, ``"value"``). Ignored for other modes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||