前言:

在做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. js 长按鼠标左键实现溢出内容左右滚动滚动

    var nextPress, prevPress; // 鼠标按下执行定时器,每0.1秒向左移一个li内容的宽度 function nextDown() { nextPress = setInterv ...

  2. spring security oauth2 搭建认证中心demo

    oauth2 介绍 ​ oauth2 协议应该是开发者们耳熟能详的协议了,这里就不做过多的介绍了,具体介绍如何在spring security中搭建oauth2的认证服务.Spring-Securit ...

  3. MySQL获取对应时间

    一.查询当前时间包含年月日 SELECT CURDATE(); SELECT CURRENT_DATE(); 二.查询当前时间包含年月日时分秒 SELECT NOW(); SELECT SYSDATE ...

  4. [源码解析] PyTorch 分布式之弹性训练(1) --- 总体思路

    [源码解析] PyTorch 分布式之弹性训练(1) --- 总体思路 目录 [源码解析] PyTorch 分布式之弹性训练(1) --- 总体思路 0x00 摘要 0x01 痛点 0x02 难点 0 ...

  5. wordpress的.htaccess很容易就被挂马啊

    wordpress的.htaccess很容易就被挂马啊 修改成这样吧: # BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnR ...

  6. SpringBoot启动报错:ould not be registered. A bean with that name has already been defined in file and overriding is disabled.

    SpringBoot启动报错 ***************************APPLICATION FAILED TO START*************************** Des ...

  7. vc++ 调用winapi调节屏幕亮度(增加win7代码demo)

    1.关于 代码是通过测试的,测试环境: win7 + MFC 为什么要发在这里? 区别于上一篇随笔. MD排版更顺眼 demo 会放到 这里 更正了上一篇随笔中的代码错误 2.头文件 #include ...

  8. 【linux项目】lichee nano linux烧写

    目录 前言 参考: 安装交叉编译链 搭建 SPI FLASH 烧录环境 让芯片进入烧写模式 sunxi 烧写命令 u-boot 裁剪 拉取 u-boot 源码 配置 u-boot 检查 flash 驱 ...

  9. 【LeetCode】441. Arranging Coins 解题报告(Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 模拟计算 二分查找 数学公式 日期 题目地址:htt ...

  10. Google Chrome调整控制台的位置

    众所周知,控制台是开发必备的工具,学会流畅的使用控制台会给我们的开发带来不一样的体验,但是控制台的位置有时却是困扰我们的一件事,控制台默认是在浏览器内,有时十分妨碍我们,那么有没有什么办法修改控制台的 ...