Skip to content

Check / Uncheck

Type: page-check  ·  Package: Browser v1.0.0

Check or uncheck a checkbox (checkbox) or radio button (radio). Unlike a direct Click, it guarantees the final state you want: if you ask to mark and it was already marked, it leaves it marked (it does not change it).

Locates the element by its selector and takes it to the state indicated by checked: true checks it, false unchecks it. That’s why it’s more reliable than a click, which simply toggles the state.

ParameterEditorDescription
selectorselectorThe option box or button.
ParameterEditorDescription
pagesessionThe page session. Omit it inside a body; outside, pass = page.
checkedbooleantrue = marcar (def.) · false = desmarcar.
timeoutnumberMaximum in ms to wait. By default 30000.
Page Check selector = (#aceptoTerminos) // marcar (checked = true by default)
Page Check selector = (#recibirPublicidad) checked = false // desmarcar
  • Click — for elements that are not boxes.
  • Get Attribute — check the status by reading the checked attribute.