robotframework / robotframework/SeleniumLibrary
Selenium 4.5.0 | NotImplementedError when attempting actions on disabled elements
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
For issues
Steps to reproduce the issue
Using selenium 4.5.0+
*** 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}
Error messages and additional information
NotImplementedError: Select element is disabled and may not be used.
This seems to be caused by a change in https://github.com/SeleniumHQ/selenium/issues/10812 (specifically https://github.com/SeleniumHQ/selenium/commit/e2bbb54153370ee56b43e7260aef5923ec826be4#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
- Robot Framework: 5.0.1
- Selenium: 4.5.0
- SeleniumLibrary: 6.0.0
- Interpreter: Python 3.9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided Robot Framework reproduction against Selenium 4.4.3 and 4.5.0, then review the linked Selenium issue and commit for the disabled-element behavior. Trace the SeleniumLibrary keyword used by Get Selected List Label and verify that the selected option can be read from a disabled list without breaking other actions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100