-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!I-defectSomething is not working as intendedSomething is not working as intended
Description
What happened?
element.get_dom_attribute("checked") for a checked checkbox element is not returning True
In 4.27.0, element.get_attribute() was deprecated in favor of element.get_dom_attribute(). However, the new method does not get the correct results, as in the following example where I was determining whether or not a checkbox was checked:
(Pdb+) element.tag_name
'input'
(Pdb+) attribute
'checked'
(Pdb+) element.get_attribute(attribute)
'true'
(Pdb+) element.get_dom_attribute(attribute)
(Pdb+) element.get_dom_attribute(attribute)
(Pdb+)How can we reproduce the issue?
Call `element.get_dom_attribute(attribute)` for an `input` element of `type="checkbox"`, where the checkbox is checked.
There's no output.
The deprecated method, `element.get_attribute(attribute)`, correctly returns `true`.Relevant log output
(Pdb+) element.tag_name
'input'
(Pdb+) attribute
'checked'
(Pdb+) element.get_attribute(attribute)
'true'
(Pdb+) element.get_dom_attribute(attribute)
(Pdb+) element.get_dom_attribute(attribute)
(Pdb+)Operating System
Any
Selenium version
Python - 4.27.0
What are the browser(s) and version(s) where you see this issue?
Chrome
What are the browser driver(s) and version(s) where you see this issue?
Latest
Are you using Selenium Grid?
No
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!I-defectSomething is not working as intendedSomething is not working as intended