前言:

在做web自动化时,遇到一个缩放了浏览器比例的操作,从100%缩小到80%,再进行点击的时候,弹出报错信息,无法点击

selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (117, 674)
(Session info: chrome=76.0.3809.132)

 

debug一下代码,发现可以根据元素属性,查找的到,不过就是点击不了

百度一下原因,说是元素相互覆盖,点击的位置被覆盖了,导致不能进行点击

解决方案:

第一种方式:采用js注入,执行click

element_loc = self.get_element(loc=loc, time=times)
self.driver.execute_script("arguments[0].click();", element_loc)

第二种方式:还有其他方式,比如ActionChains

第三种,采用回车替换点击

参考文章:https://blog.csdn.net/Makasa/article/details/113917649

https://blog.csdn.net/weixin_44321116/article/details/105118565

python + web自动化,点击不生效,提示“selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (117, 674)”的更多相关文章

  1. python无法启动火狐浏览器且报错“selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities”

    安装了python2,使用pip安装了selenium,但是在使用时,报了“selenium.common.exceptions.WebDriverException: Message: 'gecko ...

  2. python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...

  3. 【Python + Selenium】初次用IE浏览器之报错:selenium.common.exceptions.WebDriverException: Message: Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones.

    初次用IE浏览器运行自动化程序时,报错:selenium.common.exceptions.WebDriverException: Message: Unexpected error launchi ...

  4. python 安装selenium首次运行错误selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH

    问题原因: 没有安装相关的支撑driver https://npm.taobao.org/mirrors/chromedriver/ 下载对应的driver 放置到python路径下

  5. python+selenium之——错误:selenium.common.exceptions.WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH.

    此时,需要自己配置geckodriver 下载geckodriver,地址:https://github.com/mozilla/geckodriver/releases 下载后解压得到geckodr ...

  6. Selenium click不生效 报错selenium.common.exceptions.InvalidArgumentException

    记录在使用selenium过程中踩的坑------ 在使用selenium时,用click点击网站弹出的文件上传框的"上传文件"按钮不生效,报错selenium.common.ex ...

  7. selenium.common.exceptions.UnexpectedAlertPresentException: Alert Text: None;Message: unexpected alert open: {Alert text : 您点击的频率过快!请稍后再试}

    报错 Traceback (most recent call last): File "C:/myFiles/code/cnki/cnki_1/core/knavi.py", li ...

  8. 【Python web自动化】之读取配置文件参数,利用cookie返回值进行跳过验证码进行登录操作

    当进行Python的Web自动化时,会涉及到验证码问题,该如何跳过执行呢,下面请看代码: 1.首先新建配置文件*.ini格式 config.ini [db] #基础地址: baseurl = http ...

  9. Selenium基于Python web自动化基础一 -- 基础汇总及简单操作

    Selenium是UI层WEB端的自动化测试框架,也是目前市面上比较流行的自动化测试框架. ui层自动化测试本质是什么?模拟用户的真实操作行为. 基础汇总: 导入所需要的模块 from seleniu ...

随机推荐

  1. Linux 网卡配置文件,命令详细设置

    1.配置文件/etc/hosts(本地主机ip地址映射,可以有多个别名)./etc/services(端口号与标准服务之间的对应关系)./etc/sysconfig/network(设置主机名,网关, ...

  2. System.exit(-1)和return 的区别

    对于只有一个单一方法的类或者系统来说是一样的,但是对于含有多个类和方法,且调用关系比较复杂时就不一样了. System.exit(-1)是指所有程序(方法,类等)停止,系统停止运行. return只是 ...

  3. linux 彻底卸载mysql

    1.  停止 mysql 服务: systemctl stop mysqld.service 2. yum remove mysql (因为 之前是通过 yum -y install 方式安装的 ) ...

  4. python3.6.4 scrapy框架from PIL import Image报错 from . import _imaging as core

    scrapy框架爬取url下载图片时,用ImagesPipeline下载图片 from PIL import Image报错 from . import _imaging as core Import ...

  5. seata服务端和客户端配置(使用nacos进行注册发现,使用mysql进行数据持久化),以及过程中可能会出现的问题与解决方案

    seata服务端和客户端配置(使用nacos进行注册发现,使用mysql进行数据持久化),以及过程中可能会出现的问题与解决方案 说明: 之所以只用nacos进行了注册与发现,因为seata使用naco ...

  6. PostgreSql数据库安全加固

    1.确保通过"主机" TCP / IP套接字登录已正确配置 描述 大量的身份验证方法可用于使用 TCP / IP套接字,包括: ?信任 ? 拒绝 ?md5 ?scram-sha-2 ...

  7. 人工水母搜索算法--JS

    1. 人工水母算法原理背景 水母生活在世界上不同深度和温度的水中.它们酷似钟状,一些水母的直径小于1cm,然有些水母直径则非常大.它们有各种各样的颜色.大小和形状.大多数水母偏好海洋环境.它们进食的方 ...

  8. 听听文档(视频)-Power Pivot

    打开微信扫描二维码

  9. PLSQL Developer 13安装教程

    1:双击安装包进行安装.点击"next".2:点击"w accept the termis..."同意条款,并点击"next",进行下一步. ...

  10. CF139A Petr and Book 题解

    Content 小 P 有一本 \(n\) 页的书,现给出他一周七天每天的阅读页数,求它在星期几读完这本书. 数据范围:\(1\leqslant n\leqslant 1000\). Solution ...