前言:

在做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. MFC入门示例之单选框、复选框

    设置默认选中一个单选按钮,OnInitDialog()函数中添加: CheckRadioButton(IDC_RADIO1, IDC_RADIO2, IDC_RADIO2); 按钮事件处理 1 voi ...

  2. java异常处理中throws和throw的使用

    异常介绍: 运行时异常.非运行时异常 在编写可能会抛出异常的方法时,它们都必须声明为有异常. 一.throws关键字 1.声明方法可能抛出的异常: 2.写在方法名后面: 3.可声明抛出多个异常,异常名 ...

  3. 制作一个有趣的涂鸦物联网小项目(涂鸦模组SDK开发 CBU BK7231N WiFi+蓝牙模组 HSV彩色控制)

    实现的功能: l  APP控制月球灯 l  本地月球灯控制 l  APP控制"大白"颜色,实现各种颜色变身 l  门状态传感器状态APP显示 l  网络状态指示灯,连接服务器长亮, ...

  4. Table.Sort排序…Sort(Power Query 之 M 语言)

    数据源: 任意查询表 目标: 对其中一列数据进行排序 操作过程: 选取对象>[主页]>[排序]>[升序排序] 选取对象>[主页]>[排序]>[降序排序] M公式: ...

  5. Linux执行脚本报错:-bash: ./xx.sh: /bin/bash^M: bad interpreter: No such file or directory

    1.用vim打开文本 输入 : set ff 这里要先按":"号 显示文件为dos格式 2.强制装换格式为unix 先按冒号":" set ff=unix 然后 ...

  6. 网络编程之新函数inet_pton和inet_ntop

    1.头文件 1 #include <arpe/inet.h> 2.inet_pton 函数 A.原型 1 int inet_pton(int family, const char *str ...

  7. Visual Studio之__cplusplus版本

    1. 默认值 Visual Studio(下文简称VS)中__cplusplus宏的默认值一直是: 199711L 可以用下面的代码查看 __cplusplus 的输出结果: #pragma once ...

  8. 一个c++11自定义的信号量

    1.关于 This is from here But I did some changes. 2. semaphore.h /** @ brief : this is from https://sta ...

  9. 【LeetCode】532. K-diff Pairs in an Array 解题报告(Python & C++)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 字典 日期 题目地址:https://leetcod ...

  10. 【LeetCode】319. Bulb Switcher 解题报告(Python)

    [LeetCode]319. Bulb Switcher 解题报告(Python) 标签(空格分隔): LeetCode 题目地址:https://leetcode.com/problems/bulb ...