Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

193
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!