Get started

Reference Workflows 06 / 06

Focus step

Move keyboard focus to an element without clicking it. A step a recorded Writ workflow can run, with its fields and an example.

Runs on Writ CloudWrit Desktop

Open in Claude Open in ChatGPT

The focus step puts the keyboard caret on an element without dispatching a pointer event. Use it when a click would trigger something you do not want — a dropdown, a tracking handler — but the field still needs focus before the next keystroke.

In a workflow, this step is a JSON object with "type": "focus". Steps run in order, and each step can read the outputs of the steps before it.

Fields

Set these inside the step’s config object.

selector selector required
The element to focus.

Example

One focus step, as it appears in the steps list of a workflow.

Step
{
  "type": "focus",
  "config": { "selector": "#search" }
}

How it behaves

  • Pair it with press or type, which act on whatever currently holds focus.
  • Elements the browser will not focus (and selectors that match nothing) fail the step rather than passing quietly.

Where it runs

The step runs wherever its workflow runs. On Writ Desktop, runs are free and can reach systems that only your own network can reach.

On Writ Cloud, each call costs credits: 20 when the run needs a browser, 2 when it does not. A call that fails because of the site or Writ costs nothing.

Next