MarkusBernhardt / robotframework-selenium2library-java

Java port of the Selenium 2 (WebDriver) Python library for Robot Framework
Apache License 2.0
46 stars 51 forks source link

Element.isEnabled() method checks for readonly and it shouldn't #54

Closed atmcarmo closed 9 years ago

atmcarmo commented 10 years ago

I found out that isEnabled() method on Element class searches for the readonly attribute. This is not correct, since readonly and disabled attributes mean different things:

For example, if we use the keywords Element Should Be Enabled/Disabled, if the element is "readonly" these keywords will think that the element is disabled, when it might not be. We can have a readonly element that is enabled.

Thank you very much.

MarkusBernhardt commented 10 years ago

I ported that piece of code directly from the Python library and also do not like this (and some other quirks), but I think fixing it will lead to even more confusion. So the way you can go is to actually specify the correct attributes to test yourself:

ZKOSS
    Open Browser    http://www.zkoss.org/zkdemo/input/form_sample    firefox    mainbrowser
    Wait Until Page Contains Element    //input[not(@disabled='disabled') and ../../../td[1]//span[contains(text(), 'Password')]]
MarkusBernhardt commented 9 years ago

Won't fix.