Skip to content
Advertisement

Selenium-Debugging: Element is not clickable at point (X,Y)

I try to scrape this site by Selenium.

I want to click in “Next Page” buttom, for this I do:

 driver.find_element_by_class_name('pagination-r').click()

it works for many pages but not for all, I got this error

WebDriverException: Message: Element is not clickable at point (918, 13). Other element would receive the click: <div class="linkAuchan"></div>

always for this page

I read this question

and I tried this

driver.implicitly_wait(10)
el = driver.find_element_by_class_name('pagination-r')
action = webdriver.common.action_chains.ActionChains(driver)
action.move_to_element_with_offset(el, 918, 13)
action.click()
action.perform()

but I got the same error

Advertisement

Answer

Another element is covering the element you are trying to click. You could use execute_script() to click on this.

element = driver.find_element_by_class_name('pagination-r')
driver.execute_script("arguments[0].click();", element)
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement