Represents the checkbox control. Default search is performed by the label.

<label class="checkbox-inline">
  <input type="checkbox" id="inlineCheckbox1" value="option1"> Option 1
</label>
<label class="checkbox-inline">
  <input type="checkbox" id="inlineCheckbox2" value="option1" checked> Option 2
</label>
using Atata;
using _ = SampleApp.SamplePage;

namespace SampleApp
{
    public class SamplePage : Page<_>
    {
        [FindByLabel]
        public CheckBox<_> Option1 { get; private set; }

        [FindByLabel]
        public CheckBox<_> Option2 { get; private set; }
    }
}
Go.To<SamplePage>().
    Option1.Check().
    Option1.Should.BeChecked().
    Option2.Uncheck().
    Option2.Should.Not.BeChecked();

Properties

public DataProvider<bool, TOwner>

IsChecked { get; }

Gets the DataProvider<bool, TOwner> instance of the checked state value.

Methods

public TOwner

Check()

Checks the control. Also executes TriggerEvents.BeforeSet and TriggerEvents.AfterSet triggers.

public TOwner

Uncheck()

Unchecks the control. Also executes TriggerEvents.BeforeSet and TriggerEvents.AfterSet triggers.