Very basic question on verifyChecked command


#1

Hey there, folks. FYI, I’m not a programming guy by any means and I sort of struggle with syntax, although the logic of various operations is usually clear to me.

I’m working with Kantu in order to automate some stuff for work. Basically, I’m needing to verify if certain checkboxes are indeed checked. If a box is NOT checked, then I’ve got something that will check them. The issue is that sometimes I will need a checked checkbox to be unchecked, and when the verifyChecked command is used on an already-checked box I get the following error:

Cannot read property ‘vars’ of undefined

By the way, below is the macro that actually functions when I use it on unchecked boxes. Any pointers on how to approached boxes that are checked? Hopefully this was clear.

{
  "Command": "verifyChecked",
  "Target": "id=id_timeclose_enabled",
  "Value": ""
},
{
  "Command": "if",
  "Target": "!${!LastCommandOK}",
  "Value": ""
},
{
  "Command": "type",
  "Target": "id=id_timeclose_enabled",
  "Value": ""
},
{
  "Command": "click",
  "Target": "id=id_timeclose_enabled",
  "Value": ""
},
{
  "Command": "endif",
  "Target": "",
  "Value": ""
}

#2

Hi, I confirmed the issue: verifyChecked and assertChecked trigger an error " [error] Cannot read property ‘vars’ of undefined" if the checkbox is check. The command only works if the checkbox is not checked!. That is clearly a bug and we will fix it asap. Thanks a lot for reporting this issue!

I used this test page: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_type_checkbox

verifychecked