Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Selenium 4.5.0 | NotImplementedError when attempting actions on disabled elements

Aberta
#1,790 4 comentários 2 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
testing-qa

Direção de pesquisa

Comece executando a reprodução fornecida do Robot Framework com Selenium 4.4.3 e 4.5.0 e, em seguida, revise a issue e o commit vinculados do Selenium sobre o comportamento de elementos desabilitados. Rastreie a keyword do SeleniumLibrary usada por Get Selected List Label e verifique se a opção selecionada pode ser lida de uma lista desabilitada sem interromper outras ações.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
Python
Estrelas
1.5k
Forks
787
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de robotframework/SeleniumLibrary

Todas as issues de robotframework/SeleniumLibrary

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.