robotframework-browser icon indicating copy to clipboard operation
robotframework-browser copied to clipboard

Get Element States causes an uncaught error in the browser

Open rousku opened this issue 2 years ago • 4 comments

Describe the bug Running Get Element States against a node that is not a checkbox will result in an uncaught error in the browser console.

To Reproduce Steps to reproduce the behavior:

  1. Get Element States xpath=//*[@id="node_that_is_not_checkbox"]
  2. Uncaught (in promise) Error: Not a checkbox or radio button message appears in the console.

Expected behavior No error should be thrown.

Screenshots image image

Desktop:

  • OS: Windows 11
  • Browser: chromium
  • Version: 13.2.0

rousku avatar Jul 05 '22 12:07 rousku

@allcontributors please add @rousku for bugs.

aaltat avatar Jul 06 '22 05:07 aaltat

@aaltat

I've put up a pull request to add @rousku! :tada:

allcontributors[bot] avatar Jul 06 '22 05:07 allcontributors[bot]

@rousku can you please post a screenshot of that element in DOM. And can you please show what the content of the attribute "role" is of that element.

you can just copy the jsPath of that element in the DOM. Then go into console of the browsers dev tools. Then past the copied path and add .getAttribute("role") and hit Enter.

It seems that your element has the role checkbox or radio, but it is something different.

Snooz82 avatar Jul 08 '22 08:07 Snooz82

There you go: image image

rousku avatar Jul 08 '22 10:07 rousku

@rousku

I can not reproduce anymore.

Please ping us again, if this still appears on your side.

Snooz82 avatar Feb 06 '23 18:02 Snooz82