-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clicking Invisible option elements should not succeed (from google code #8563) #379
Comments
You can see a possible solution for the disable-problem at elisarver/selophane@3d191b3. |
clear. Copied a lot of code from the original implementation. Created an issue at selenium https://code.google.com/p/selenium/issues/detail?id=8563
…inspired by #379. The tests are based on the current drivers' behavior, not sure if it is correct or not.
Current behavior matches W3C WebDriver standard [1] that describes a special case of click operation for 'option' elements. Selenium does not actually click it, it selects an option. So it allows to select an option if it is selectable but not clilckable. For example, Firefox allows to pick an option with style="display: none;" if you put focus to its 'select' parent and govern it with the keyboard. But Firefox driver allows to select a disabled element, and it seems to be an issue, I've moved it to geckodriver tracker [2] [1] https://w3c.github.io/webdriver/webdriver-spec.html#element-click |
example html:
options = driver.find_elements_by_tag_name("option")
options[0].click(); <- behaves as expected
options[1].click(); <- does a no-op (expected behavior IMO)
options[2].click(); chrome renders this option, firefox doesn't. Firefox doesn't allow the user to select this, but WebDriver will select this option with this call.
options[3].click(); <- no one renders this option and it isn't settable by a user... yet webdriver sets it (and thus updates the rendered UI)
Related W3C WebDriver spec bug - https://www.w3.org/Bugs/Public/show_bug.cgi?id=28143
The text was updated successfully, but these errors were encountered: