Select all checkboxes on a page

Is it possible to have Macro to select all the checkboxes on a page

Thanks in advance.

Hey There,

A page of what?

-Chris

A browser page, Chrome and Mozilla. I am sorry I am new to this software. But out of curiosity , does the browser matter?

Hey Kapil,

Essential information! :smile:

No worries.

Yes.

It is always desirable to be specific about what application or applications a macro will be used with.

The only reason Safari and Chrome have Keyboard Maestro actions is because they are AppleScriptable, so it absolutely does matter which browser.

There are Set Checkbox actions for both Safari and Chrome.

Chrome's AppleScripted JavaScript is a bit flakey at times, so Safari is likely to be more robust.

Can you check ALL of the checkboxes at once? There are two possible methods.

Use Set Checkbox actions for each checkbox (similar to the graphic below) on a known set of them on a known page:

Or learn enough JavaScript to detect and check every checkbox on a page (or find someone to help with that).

See the little down-arrow next to 'Safari' in the action?

If KM can see checkboxes in the front Safari Tab that will open when clicked to reveal a list of those detected. (It won't open at all if KM cannot see any checkboxes.)

-Chris