Skip to main content

Set Checkbox

The Set Checkbox action selects or clears a checkbox using its associated label.

When to Use

Use this action for options such as:

  • Enable Notifications
  • Accept Terms
  • Remember Me
  • Stay Awake
  • Auto Sync

Syntax

var task = suremdmjs.automate().checkbox(
"<Package Name>",
"<Label Text>",
<true | false>
);

suremdmjs.automate().performAction(
task,
"onSuccess",
"onFailure"
);

Parameters

ParameterDescription
Package NameTarget application package.
Label TextText displayed beside the checkbox.
Checkedtrue selects the checkbox, false clears it.

Example

var task = suremdmjs.automate().checkbox(
"",
"Stay awake",
true
);

suremdmjs.automate().performAction(
task,
"onSuccess",
"onFailure"
);

Expected Result

The Stay awake checkbox is selected.

💬 Help us improve this documentation

Was this information useful?

Your feedback helps us keep our documentation accurate, up to date, and useful.