Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selenium.common.exceptions.ElementClickInterceptedException #115

Open
NonlinearNimesh opened this issue Apr 12, 2021 · 2 comments
Open

selenium.common.exceptions.ElementClickInterceptedException #115

NonlinearNimesh opened this issue Apr 12, 2021 · 2 comments

Comments

@NonlinearNimesh
Copy link

Traceback (most recent call last):
File "crawler.py", line 83, in
args.username, args.number, args.mode == "posts_full", args.debug
File "crawler.py", line 27, in get_posts_by_user
ins_crawler = InsCrawler(has_screen=debug)
File "/Users/nimesh/.Trash/instagram-crawler-master/inscrawler/crawler.py", line 70, in init
self.login()
File "/Users/nimesh/.Trash/instagram-crawler-master/inscrawler/crawler.py", line 87, in login
login_btn.click()
File "/Users/nimesh/anaconda3/envs/untitled/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 80, in click
self._execute(Command.CLICK_ELEMENT)
File "/Users/nimesh/anaconda3/envs/untitled/lib/python3.7/site-packages/selenium/webdriver/remote/webelement.py", line 628, in _execute
return self._parent.execute(command, params)
File "/Users/nimesh/anaconda3/envs/untitled/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/Users/nimesh/anaconda3/envs/untitled/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element ... is not clickable at point (400, 265). Other element would receive the click:

...

(Session info: headless chrome=89.0.4389.114)

@qlofly
Copy link

qlofly commented Apr 13, 2021

Based on the error, you are trying to click on an element that does not support click on it.
You need to select a different item to click

@blubdiblah
Copy link

There may be an "Accept Cookies" modal covering the login button.
As quick fix I just added following after browser.get(url) in the login() function:

accept_cookies = browser.find_one(".bIiDR")
if accept_cookies is not None:
accept_cookies.click()
time.sleep(5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants