I’ve problem to assert that checkbox is checked. I’m using automation web testing framework which recording my clicks and generate JavaScript code. The problem is even if the checkbox is unmarked, test is passed. This is the HTML code before box to be marked:
<span class="control-indicator"></span>
This is the HTML code after box is marked:
<span class="control-indicator">…</span>
Only three dots difference. This is the generated code:
"13.Assert": function() {
eq($(".control-indicator").eq(0).attr("class"), "control-indicator");
}
I’ve tried:
"13.Assert": function() {
eq($(".control-indicator").eq(0).attr("class"), "control-indicator").checked;
}
"13.Assert": function() {
eq($(".control-indicator").eq(0).attr("class"), "control- indicator".checked);
}
"13.Assert": function() {
eq($(".control-indicator").eq(0).attr("class"), "control-indicator".isSelected);
}
But they didn't work. Could you help me with ideas how to write this assert?