Google Groups

Re: disabled: comes out as "true" but needs to go in as "disabled" ?


semperos Jan 3, 2012 4:34 PM
Posted in group: clj-webdriver
Andrew,

This is accidental complexity introduced by Selenium-WebDriver. They explain that a number of attributes are treated as "boolean" attributes and thus return true/false as a "feature:"


Given that the value for these attributes is the same as the attribute name, and that I can only imagine checking if something is disabled or not (a boolean check), does it makes sense to "normalize" the `.getAttribute` method on the Clojure side by making something like `(attribute element :disabled)` return "disabled" (a truthy value) instead of "true" (also a truthy value)?

Your thoughts?