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

196
Visualizações
Using selenium to click ajax button

I'm trying to understand how to interact on a site with an ajax element. I'm using selenium+phantomJS to click the "More" button which has this code:

<a class="js-cne-ajax cne-more-button cne-more-videos cne-light-button" data-ajaxurl="/genres/Books.js?page=2" rel="nofollow" href="javascript:void(0)">More</a>

I'm using this:

wait = WebDriverWait(driver, 10)
next_link = wait.until(EC.element_to_be_clickable((By.CSS_SELECTOR, "a.js-cne-ajax.cne-more-button.cne-more-videos.cne-light-button")))
next_link.click()
driver.save_screenshot('screenshot.png')

My problem is that the element seems not clickable. Can it be because is the css selector wrong or, in some way, the ajax pages needs different approach? Can the "rel=nofollow" create some problems?

over 4 years ago · Santiago Trujillo
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