robotframework-browser
robotframework-browser copied to clipboard
Get Element States causes an uncaught error in the browser
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:
-
Get Element States xpath=//*[@id="node_that_is_not_checkbox"]
- Uncaught (in promise) Error: Not a checkbox or radio button message appears in the console.
Expected behavior No error should be thrown.
Screenshots
Desktop:
- OS: Windows 11
- Browser: chromium
- Version: 13.2.0
@allcontributors please add @rousku for bugs.
@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.
There you go:
@rousku
I can not reproduce anymore.
Please ping us again, if this still appears on your side.