This is my code I need to select the checkbox but couldn't select the checkbox.
<label class="">
<span class="label-input">
<div class="icheckbox" style="position: relative;">
<input class="icheck" data-val="true" data-val-checkbox="Please confirm you have accepted Terms & Conditions of Use." data-val-required="The Confirm you have accepted Terms & Conditions of Use field is required." id="loginModel_IsAllCriteriaConfirm" name="loginModel.IsAllCriteriaConfirm" type="checkbox" value="true" style="position: absolute; opacity: 0;"><ins class="iCheck-helper" style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;">
</ins>
</div>
<input name="loginModel.IsAllCriteriaConfirm" type="hidden" value="false"></span>
<span class="label-text">By ticking this box you also confirm that you <br>accept the Terms & Conditions of Use.
</span>
</label>
I have tried
AutomationService.SelectCheckbox<HtmlCheckBox>(AutomationService.PropertyType.Id, "loginModel_IsAllCriteriaConfirm", "check");
and
AutomationService.Click<HtmlCheckBox>(AutomationService.PropertyType.Id, "loginModel_IsAllCriteriaConfirm");
but no success. Can someone help me with it?