Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

152
Visualizações
Selenium didn't see that attribute value has changed

I'm trying to get number of notifications from element using Selenium, but it didn't see changes. Number of messages just a number above notification icon, like on picture:

But then I trying to process this element:

notify_element = WebDriverWait(driver, 20).until(EC.visibility_of_element_located((By.CLASS_NAME, 'data-count')))
    count_of_notify = int(notify_element.get_attribute('data-count'))

I recive count_of_notify = 0. I don't understand why.

Code of this element:

<a id="notify-toggle" class="toggle link">
    <span title="Уведомления" class="data-count" data-count="1" data-icon="">
    </span>
</a>

But data-count changes depanding on number of notifications.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda