python + web自动化,点击不生效,提示“selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (117, 674)”
前言:
在做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)”的更多相关文章
- python无法启动火狐浏览器且报错“selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities”
安装了python2,使用pip安装了selenium,但是在使用时,报了“selenium.common.exceptions.WebDriverException: Message: 'gecko ...
- python+selenium,打开浏览器时报selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
有一年多没写web自动化了,今天搭建环境的时候报了一个常见错误,但是处理过程有点闹心,报错就是常见的找不到驱动<selenium.common.exceptions.WebDriverExcep ...
- 【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 ...
- python 安装selenium首次运行错误selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH
问题原因: 没有安装相关的支撑driver https://npm.taobao.org/mirrors/chromedriver/ 下载对应的driver 放置到python路径下
- python+selenium之——错误:selenium.common.exceptions.WebDriverException: Message: ‘geckodriver’ executable needs to be in PATH.
此时,需要自己配置geckodriver 下载geckodriver,地址:https://github.com/mozilla/geckodriver/releases 下载后解压得到geckodr ...
- Selenium click不生效 报错selenium.common.exceptions.InvalidArgumentException
记录在使用selenium过程中踩的坑------ 在使用selenium时,用click点击网站弹出的文件上传框的"上传文件"按钮不生效,报错selenium.common.ex ...
- 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 ...
- 【Python web自动化】之读取配置文件参数,利用cookie返回值进行跳过验证码进行登录操作
当进行Python的Web自动化时,会涉及到验证码问题,该如何跳过执行呢,下面请看代码: 1.首先新建配置文件*.ini格式 config.ini [db] #基础地址: baseurl = http ...
- Selenium基于Python web自动化基础一 -- 基础汇总及简单操作
Selenium是UI层WEB端的自动化测试框架,也是目前市面上比较流行的自动化测试框架. ui层自动化测试本质是什么?模拟用户的真实操作行为. 基础汇总: 导入所需要的模块 from seleniu ...
随机推荐
- 类型类 && .class 与 .getClass() 的区别
一. 什么是类型类 Java 中的每一个类(.java 文件)被编译成 .class 文件的时候,Java虚拟机(JVM)会为这个类生成一个类对象(我们姑且认为就是 .class 文件),这个对象包含 ...
- Ribbon详解
转自Ribbon详解 简介 Spring Cloud Ribbon是一个基于HTTP和TCP的客户端负载均衡工具,它基于Netflix Ribbon实现.通过Spring Cloud的封装,可以让 ...
- CSS font-size: 0去除内联元素空白间隙
我们在编写HTML标签的时候,通常会使用换行,缩进来保证代码的可读性.同时,在编写CSS样式的时候,也会需要把一些元素设置为inline或inline-block.这样一来,有时在页面中会出现意外的空 ...
- Appium获取toast消息遇到的问题(一)
一.运行错误 Android获取toast,需要在参数里设置automationName:Uiautomator2 1 # 设置设备的信息 2 desired_caps = { 3 'platform ...
- eclipse.ini配置 vmargs 说明
-vmargs -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M 1. 各个参数的含义什么? 参数中-vmargs的意思是设置JVM参数, ...
- Kubernetes-存储(二)
前言 本篇是Kubernetes第十三篇,大家一定要把环境搭建起来,看是解决不了问题的,必须实战. Kubernetes系列文章: Kubernetes介绍 Kubernetes环境搭建 Kubern ...
- <转>C++继承中虚函数的使用
转自:http://blog.csdn.net/itolfn/article/details/7412364 一:继承中的指针问题. 1. 指向基类的指针可以指向派生类对象,当基类指针指向派生类对 ...
- 模糊C均值算法
Fuzzy C-Means读书笔记 一.算法简介 很显然,图中的数据集可分为两个簇.借鉴K-Means算法的思想,利用单个特殊的点(质心)表示一个簇.因此,我们用\(C_1\)和\(C_2\)分别表示 ...
- MVC三种分页方法
View部分: @using WebApplication1.Models;分页方法1引包 @*@using PagedList.Mvc; @using WebApplication1.Models; ...
- 实时&离线皮肤渲染技术(Real-time&Offline Skin Rendering)
目录 现实皮肤模型 BSSRDF 渲染模型 [2001] Diffusion Profile(扩散剖面)[2001] 偶极子 [2002] 高斯和 [2007] Burley Normalized D ...