前言:

在做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. oracle体系结构(图)

  2. Spring 的 init-method 和 destory-method

    关于在spring  容器初始化 bean 和销毁前所做的操作定义方式有三种 第一种注解: 通过@PostConstruct 和 @PreDestroy 方法 实现初始化和销毁bean之前进行的操作 ...

  3. 错误: 找不到或无法加载主类(IDEA中启动spring boot项目)

    版权声明:本文为博主原创文章,如果转载请给出原文链接:http://www.jufanshare.com/content/142.html 提示:需要对IDEA编辑工具使用熟悉 出现一个问题,就是sp ...

  4. C# 温故知新 第二篇 C# 程序的通用结构

    C# 程序由一个或多个文件组成. 每个文件均包含零个或多个命名空间. 一个命名空间包含类.结构.接口.枚举.委托等类型或其他命名空间. 以下示例是包含所有这些元素的 C# 程序主干. 主要包括  1. ...

  5. 用Navicat连接数据库-数据库连接(MySQL演示)

    用Navicat连接数据库-数据库连接(MySql演示) 已成功连接,连接方式步骤如下: 开始之前首先准备连接信息: [ 一般你可以自己去配置文件中找 或者 问连接过该数据库的人/所有者(负责人/同学 ...

  6. canvas绘制圣诞树

    最近不知道咋的都玩起了用备忘录手绘圣诞树,作为万能的程序员,肯定也要跟上潮流,那用代码来实现圣诞树吧.哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈 实现效果如下: ...

  7. 【web】sqli-labs学习

    第一页 1~4预备知识(基于错误的注入)   几个常用函数: 1. version()--MySQL 版本 2. user()--数据库用户名 3. database()--数据库名 4. @@dat ...

  8. CF475A Bayan Bus 题解

    Update \(\texttt{2020.10.6}\) 修改了一些笔误. Content 模拟一个核载 \(34\) 人的巴士上有 \(k\) 个人时的巴士的状态. 每个人都会优先选择有空位的最后 ...

  9. JavaScript扫盲笔记:

    JavaScript学习: JavaScript代码存在形式: -Head中 <script> </script> -文件 <script src='代码所在路径'> ...

  10. makefile 规则与原理

    target : prerequisites command Target 通常称作目标.它是一个目标文件,可以是Object File,也可以是执行文件.还可以是一个标签(Label).Prereq ...