Selenium 错误 Element is not clickable at point (x, y). Other element would receive the click

在使用 Selenium 进行网页抓取时,可能会遇到 'Element is not clickable at point' 的错误,原因是元素被遮挡。解决方法是在点击前确保元素可见。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在使用Selenium 进行抓取网页的时候,对网页中 按钮或者超链接 进行点击的时候,往往会遇到下列问题

Traceback (most recent call last):
  File "F:/Python_work/PyReview/jnta.py", line 24, in <module>
    WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.PARTIAL_LINK_TEXT, u'下一页'))).click()
  File "E:\Python3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 77, in click
    self._execute(Command.CLICK_ELEMENT)
  File "E:\Python3\lib\site-packages\selenium\webdriver\remote\webelement.py", line 493, in _execute
    return self._parent.execute(command, params)
  File "E:\Python3\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 256, in execute
    self.error_handler.check_response(response)
  File "E:\Python3\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in c

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值