Selenium 4.5.0 | NotImplementedError when attempting actions on disabled elements
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- testing-qa
调研方向
首先,使用 Selenium 4.4.3 和 4.5.0 运行提供的 Robot Framework 复现,然后查看链接的、关于禁用元素行为的 Selenium issue 和 commit。跟踪 Get Selected List Label 使用的 SeleniumLibrary keyword,并验证可以从禁用列表中读取已选选项,同时不会破坏其他操作。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Python
- 星标
- 1.5k
- 派生
- 787
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
robotframework/SeleniumLibrary 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 67/100
robotframework/SeleniumLibrary#1941 · 3 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 65/100
robotframework/SeleniumLibrary#1833 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
robotframework/SeleniumLibrary#1436 · 5 条评论 ·
-
难度 3/5 1-2 天 新手友好度 58/100
robotframework/SeleniumLibrary#1993 ·
-
难度 4/5 3-5 天 新手友好度 35/100
robotframework/SeleniumLibrary#1992 · 4 条评论 ·
查看 robotframework/SeleniumLibrary 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
stephrobert/dsoxlab#238 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
sublimehq/package_control#1780 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 70/100
nwg-piotr/nwg-displays#145 ·