Check and Uncheck do not work in more checkbox types

@admin

Why Check and Uncheck do not work in all checkbox ?

There are a large amount of cases where do not work.

Storecheck save the status (true or false) but after check and uncheck do not work.

It’s normal or is a bug ?

It Seems:
click and clickAt working in all checkbox (animated too)
storecheck working in all checkbox type
check and uncheck working in some types of checkbox only

My question is why click and clickat working in all checkbox and check and uncheck not wotking in all checkbox ?

Thanks

Strange, I am unaware of this issue. This is not how it should be. I could be because sending a click and toggling the state of a checkbox is technically something different.

But do you have any examples on public websites that you can share?

I found a public case, with check and unched i can not choice the checkbox (but in ui vision show green command line) with click i can click the checkbox

The ckeckbox is Filled in

I prefer check/uncheck command because I can control the status and i can choice check or uncheck, with click I can change the status only.

I do not find a good solution to solve these cases, if you can help me I very appreciate.

This ia macro code

    {
  "Name": "Check",
  "CreationDate": "2020-11-27",
  "Commands": [
    {
      "Command": "bringBrowserToForeground",
      "Target": "",
      "Value": ""
    },
    {
      "Command": "open",
      "Target": "https://materializecss.com/checkboxes.html",
      "Value": ""
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": ""
    },
    {
      "Command": "uncheck",
      "Target": "xpath=(//div[@id='checkbox']//span)[3]",
      "Value": ""
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "Uncheck Command Not Work",
      "Value": "#shownotification"
    },
    {
      "Command": "check",
      "Target": "xpath=(//div[@id='checkbox']//span)[3]",
      "Value": ""
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "Check Command Not Work",
      "Value": "#shownotification"
    },
    {
      "Command": "click",
      "Target": "xpath=(//div[@id='checkbox']//span)[3]",
      "Value": ""
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": ""
    },
    {
      "Command": "echo",
      "Target": "Click Command Work",
      "Value": "#shownotification"
    }
  ]
}

Thanks for the example. I confirmed the issue and created a ticket (#789).

1 Like

Check/Uncheck command seems different with click and ClickAt

If you have a checkbox with a text near, you can click on the text and it check the checkbox.

Check and Uncheck works only if you use the exatly xpath of checkbox, if you use others xpath (label, div) do not work.

Click and ClickAt working better.

Yes, this is by design of the CHECK/UNCHECK command. A click on the text still reaches the checkbox, but the CHECK command can only change the state of the checkbox with the direct xpath. Thanks for pointing this out! We will see if we can improve the command somehow.

1 Like

We will see if we can improve the command somehow.

We did improve it with V6.0.2 - please try again.

1 Like