0

I am trying to click this button

Next >>

My code is

next_page = driver.find_element_by_xpath("//a[contains(text(), 'Next')]")
next_page.click()

I have also tried using class name and onclick attribute name but they don't work either.

The code returns the error as ElementNotInteractableException: Message: element not interactable (Session info: chrome=88.0.4324.192).

1 Answers1

0

It's possible the button is hidden and not accessible directly. Maybe try this:

from selenium.webdriver.common.action_chains import ActionChains

next_page = driver.find_element_by_xpath("//a[contains(text(), 'Next')]")
driver.implicitly_wait(10)
ActionChains(driver).move_to_element(next_page).click(next_page).perform()

How do you fix the "element not interactable" exception?

JD2775
  • 3,658
  • 7
  • 30
  • 52