I try to scrape this site by Selenium.
I want to click in “Next Page” buttom, for this I do:
JavaScript
x
2
1
driver.find_element_by_class_name('pagination-r').click()
2
it works for many pages but not for all, I got this error
JavaScript
1
2
1
WebDriverException: Message: Element is not clickable at point (918, 13). Other element would receive the click: <div class="linkAuchan"></div>
2
always for this page
I read this question
and I tried this
JavaScript
1
7
1
driver.implicitly_wait(10)
2
el = driver.find_element_by_class_name('pagination-r')
3
action = webdriver.common.action_chains.ActionChains(driver)
4
action.move_to_element_with_offset(el, 918, 13)
5
action.click()
6
action.perform()
7
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.
JavaScript
1
3
1
element = driver.find_element_by_class_name('pagination-r')
2
driver.execute_script("arguments[0].click();", element)
3