Check or uncheck a box
set_checkedTick or untick a checkbox, or select a radio button, then verify the action succeeded.
Instructions
Tick or untick a checkbox, or select a radio button, and verify it took.
Use this instead of fill for anything with a checked state. fill types over a
field's text, which a checkbox does not have — and its read-back compares
value, which a checkbox never changes, so a fill could report success while
nothing was selected.
Idempotent: asking for the state it is already in is reported and does not click. Otherwise it delivers a real CDP click, on the element or, when the input is visually hidden behind a styled label (the usual custom-control pattern), on the label that controls it. The state is read back afterwards, so a failure is an error rather than a success you cannot trust.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Element uid from the most recent take_snapshot, e.g. "4_12". uids are invalidated whenever the page changes — if you get "unknown uid", take a fresh snapshot and retry with the new uid. | |
| browser | No | Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name. | default |
| checked | No | True to tick the box or select the radio, False to untick it. Radio buttons cannot be unticked by the browser — select a different one in the group instead. | |
| include_snapshot | No | Append a fresh page snapshot to the response. Worth it when this action changes the page and take_snapshot would be your next call anyway — it saves a round trip, at the cost of a much larger response. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |