facebook_page_scraper icon indicating copy to clipboard operation
facebook_page_scraper copied to clipboard

selenium.common.exceptions.ElementClickInterceptedException: Message: Element is not clickable at point ([x],[y]) because another element <div class=> obscures it

Open SchmueI opened this issue 1 year ago • 2 comments

I am using Firefox as a Browser.

When trying to connect with the Facebook Page, I sometimes face the Error mentioned in the Issue title.

This IS related to the Cookie Banner. However, searching the Internet, I found the following Link: https://proxyway.com/guides/how-to-scrape-facebook that gives some advice for adding code to the driver_utilities.py

The weird part is, that adding the following code to the py module helps - but only sometimes:

allow_span = driver.find_element(
    By.XPATH, '//div[contains(@aria-label, "Allow")]/../following-sibling::div')
allow_span.click()

Im not sure if someone can reproduce this weird behavior

SchmueI avatar Apr 30 '23 22:04 SchmueI

Entering maintenance Hell right now. Since the Cookie Dialogue just changed again, I needed to change the code as follows:

allow_span = driver.find_element(
    By.XPATH, '//div[contains(@aria-label, "Allow all cookies")]/../following-sibling::div')
allow_span.click()

SchmueI avatar May 16 '23 20:05 SchmueI

Hi @SchmueI, popups sometimes behave differently in different regions. I once tried to scrape using France proxies and it was difficult to handle the amount of blocks I was facing. The issue you mentioned in title happens sometimes because the element is behind a modal

shaikhsajid1111 avatar May 21 '23 15:05 shaikhsajid1111