Mark a Checkbox as selected

I am trying to mark a checkbox as selected.
I have tried the Web Element, Set Value, XPath = //[@id=“edtTIELogonAccept$Accept0”] and tried to set it to a boolean parameter of value true.
Also tried Click mouse, Find element by xpath = //

The html code for the check is below

<input type="checkbox" id="edtTIELogonAccept$Accept0" name="edtTIELogonAccept$Accept0" onclick="var btn = document.getElementById('btnTIELogon'); if (this.checked==true) {btn.disabled=false;} else {btn.disabled=true;}" autocomplete="off" class="ui-autocomplete-input">

@brendanv try using the mouse click by Xpath instead and click on the checkbox.

1 Like

Thanks, I have tried that.
I get the following error

Caused by: groovy.lang.MissingPropertyException: No such property: Accept0 for class: Script5

I don’t think xpath likes to see a $ symbol in the name of the element, it’s called edtTIELogonAccept$Accept0

Can I tell xpath to only look for the first part of the name? ie. edtTIELogonAccept

Hi @brendanv if you Xpath contains $ sign, please, try this solution


Works great, thanks :smiley:

1 Like

@brendanv Always glad to help:)