-
Notifications
You must be signed in to change notification settings - Fork 764
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
Selenium 4.5.0 | NotImplementedError when attempting actions on disabled elements #1790
Comments
Just to clarify, the NotImplementedError is thrown on both the *** Settings ***
Library SeleniumLibrary
*** Test Cases ***
Test Disabled Elements
Open Browser https://demos.jquerymobile.com/1.4.5/forms-disabled browser=chrome
Maximize Browser Window
${list_selection}= Get Selected List Label //select[@id='select-native-5']
List Selection Should Be //select[@id='select-native-5'] ${list_selection}
${value}= Get Value id:textinput-1
${text}= Get Text id:textinput-1
${value}= Get Value //select[@id='select-native-5']
${value}= Get Value id:select-native-5
${text}= Get Text //label[@for='checkbox-h-1a']
${text}= Get Text id:select-native-5
Close All Browsers Added a comment to the thread |
Since the original issue is closed, I wanted to summarise my points (SeleniumHQ/selenium#10812 (comment)) here:
|
* Checks in place to avoid issue with Selenium 4.5.0 robotframework/SeleniumLibrary#1790 * downgrade selenium version due to bug
I further note that for me, the suggested alternative way to write my code using the WebElement directly like this:
returns the zeroth <option> which - to be fair - is what the DOM in the browser thinks is selected. However, the pre 4.5.0 code:
returned the visible option. I don't see a way in Selenium to get the visible option...is there a way short of rewriting my code AND my tests? |
As per SeleniumHQ/selenium#10812 this functionality is getting restored/reverted in 4.6 so this can probably be closed. |
For issues
Steps to reproduce the issue
Error messages and additional information
NotImplementedError: Select element is disabled and may not be used.
This seems to be caused by a change in SeleniumHQ/selenium#10812 (specifically SeleniumHQ/selenium@e2bbb54#diff-48418bfd0178cef4e4f71bf60506204d33e152281f0bb5a670b9295689b6e01e) and from the looks of the discussion it may not be changed unless there is good cause so I wanted to bring it up here in case there were opinions on the matter. This more than likely extends to quite a few keywords and I am not quite sure what the solution would be on the SeleniumLibrary side.
Expected behavior and actual behavior
We should be able to get the selected option regardless of whether the list is disabled or not. Using the previous selenium release (4.4.3) works just fine.
Environment
Browser: Chrome latest
Browser driver: chrome latest
Operating System: Windows 10
Libraries
The text was updated successfully, but these errors were encountered: