Form automation helpers

Higher-level helpers for robust form filling and safer field-oriented workflows on top of RTOForm.
RTO_helpers Copy/paste ready Product-grade integration
Best for

Repeatable form automation flows with less low-level command glue.

Load with

RTO_form_api.js first.

When to skip

Skip this if raw RTOForm commands already cover your whole use case.

Summary

High-level robust helpers for remote form automation on top of RTOForm.

  • Exports: window.RTOHelpers
  • Depends on: RTO_form_api.js
  • Auto-binds: none
  • Uses data attributes: none

What it is

Utility layer above RTOForm.command() for common form automation tasks: wait, pick selectors, click, highlight, read/write fields, navigate, extract ids from URLs, and run async step pipelines.

In v8.5.0, this helper also exposes generic fast extraction helpers built on the optimized dom.extract path when available, with legacy fallbacks where appropriate.

v8.5.0 additions
Use extractFirst(), extractLast(), extractNth(), extractAll(), extractFrom(), findExisting(), findClickable(), findInput(), findTextbox(), clickClickable(), and typeInInput() for generic, page-side helper workflows. These helpers do not add cookie access, network interception, remote code execution, or hidden scraping.

Download

Download RTO_form_helpers.js

Example

<script src="../RTO_helpers/RTO_form_api.js"></script>
<script src="../RTO_helpers/RTO_form_helpers.js"></script>
<script>
(async function(){
  await RTOForm.detect(1500);

  await RTOHelpers.formWait("#email", 8000, "app", "wait_email");
  await RTOHelpers.formTextInput("#email", "test@example.com", false, "app", "email_set");
  await RTOHelpers.formHighlight("#email", "app", 1200, "email_hl");

  const value = await RTOHelpers.formValue("#email", "app", "email_read");
  console.log("email:", value);
})();
</script>

Public API

Main methods exposed in window.RTOHelpers:

  • formWait(selector, waitMs, tabKey, logKey)
  • formPick(label, candidates, waitEachMs, tabKey)
  • formClick(selector, tabKey, logKey)
  • formHighlight(selector, tabKey, ms, logKey)
  • formValue(selector, tabKey, logKey)
  • formAttr(selector, attrName, tabKey, logKey)
  • formTextInput(selector, val, read, tabKey, logKey)
  • formDateInput(selector, dt, read, tabKey, logKey)
  • formSelect(selector, val, read, tabKey, logKey)
  • formCheck(selector, chk, tabKey, logKey)
  • formNavigate(url, tabKey, focus, timeoutMs, logKey)
  • formFindFirstAttr(selector, attrName, waitMs, tabKey, logKey)
  • formExtractInt(text, re, groupIndex, logKey)
  • formFindHrefAndNavigate(selector, re, groupIndex, waitMs, tabKey, focus, logKey)
  • urlExtractInt(text, re, groupIndex, logKey)
  • tabGetCurrentUrl(tabKey)
  • tabOpenUrlReuse(url, opts)
  • formSubmitBySelectors(label, preferred, candidates, tabKey, opts)
  • formSelectFromCandidates(label, candidates, value, tabKey, waitMs)
  • formCheckFromCandidates(label, candidates, checked, tabKey, waitMs, fallbackSelector)
  • formCaptureIntFromCurrentUrlOrHref(opts)
  • extractValue(options, tabKey)
  • extractFirst(selector, opts, tabKey)
  • extractLast(selector, opts, tabKey)
  • extractNth(selector, nth, opts, tabKey)
  • extractAll(selector, opts, tabKey)
  • extractFrom(scope, selector, opts, tabKey)
  • findExisting(candidates, opts, tabKey)
  • findClickable(query, opts, tabKey)
  • findInput(query, opts, tabKey)
  • findTextbox(opts, tabKey)
  • clickClickable(query, opts, tabKey)
  • typeInInput(query, value, opts, tabKey)
  • runSteps(steps, ctx)

Next