WebDriverException:Element is not clickable at point - selenium执行过程中遇到的相关报错
Element is not clickable at point (x, y)
这段可以忽略:本文来自 https://www.cnblogs.com/lozz/p/9947430.html
引起这个错误的原因有不同的因素
1.Element not getting clicked due to JavaScript or AJAX calls present
建议尝试 actions 方法:
WebElement element = driver.findElement(By.id("xxx"));
Actions actions = new Actions(driver);
actions.moveToElement(element).click().build().perform();
2.Element not getting clicked as it is not within viewport
尝试使用JavascriptExecutor将元素引入视图中:
WebElement myelement = driver.findElement(By.id("xxx"));
JavascriptExecutor jse2 = (JavascriptExecutor)driver;
jse2.executeScript("arguments[0].scrollIntoView()", myelement);
3. The page is getting refreshed before the element gets clickable
4. Element is present in the DOM but not clickable.
以上2种因素尝试使用expliciwait方法:
WebDriverWait wait2 = new WebDriverWait(driver, 10);
wait2.until(ExpectedConditions.elementToBeClickable(By.id("xxx")));
5. Element is present but having temporary Overlay.
--元素被临时覆盖
induce ExplicitWait with ExpectedConditions set to invisibilityOfElementLocatedfor the Overlay to be invisible
WebDriverWait wait3 = new WebDriverWait(driver, 10);
wait3.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath("ele_to_inv")));
6. Element is present but having permanent Overlay.
--元素被永久覆盖,尝试使用JavascriptExecutor
WebElement ele = driver.findElement(By.xpath("element_xpath"));
JavascriptExecutor executor = (JavascriptExecutor)driver;
executor.executeScript("arguments[0].click();", ele);
最后,多使用 https://stackoverflow.com/
WebDriverException:Element is not clickable at point - selenium执行过程中遇到的相关报错的更多相关文章
- 【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 ...
- selenium自动化过程中如何操作Flash动画
最近在看python的爬虫框架(scrapy),一个词概括就是:"酸爽"!等把selenium自动化版块讲完后,打算写一写关于scrapy相关的知识,打算从源码角度解析下scrap ...
- python3 + selenium 运行过程中进行截图
使用driver.get_screenshot_as_file方法("D:/aaac.png")括号中为需要存放的路径及图片名称 from selenium import webd ...
- 解决python 导入selenium 库后自动化运行成功但是报错问题
本章节开始进入自动化的基础教学了,首先我们要对我们的工具有一定的熟练使用程度,做自动化常用的工具一个是搭建 RobotFramework自动化框架,另外一个便是我们最常用的python 工作原理是比较 ...
- selenium使用过程中遇到的“element not visiable”错误
PS:本博客selenium分类不会记载selenium打开浏览器,定位元素,操作页面元素,切换到iframe,处理alter.confirm和prompt对话框这些在网上随处可见的信息:本博客此分类 ...
- Element UI 中组件this.$message报错
最近在做毕设的时候,用Element UI中的消息提示message一直报以下的错误: 展示的效果也不好看,没有图标什么的: 但我明明有在main.js引入了element-ui 呀,因为毕设时间很赶 ...
- 尝试用selenium+appium运行一个简单的demo报错:could not get xcode version. /Library/Developer/Info.plist doest not exist on disk
业余时间抽空搭了个appium+selenium的环境(mac), 在执行第一个脚本的时候遇到个问题纪录下: could not get xcode version. /Library/Develop ...
- selenium自动化过程中遇到的小问题(未完待续)
1.chrome浏览器调用不起来 代码没出错的情况下,检查下chrome浏览器的版本与chromedriver.exe的版本是否匹配;下面的表格是根据网上及官网整理的chromedriver与chro ...
- selenium+python自动化85-python3.6上SendKeys报错用PyUserInput取代
前言 python2上安装SendKeys库,对于不好定位的元素,用快捷键操作是极好的,那么在3.6上安装时,会报错 python3.6安装SendKeys报错 1.python3.6安装SendKe ...
随机推荐
- 异步FIFO格雷码与空满
在传递读写时钟域的指针使用格雷码来传递,如何把二进制转换为格雷码,格雷码是如何判断读空写满呢? 二进制码转换成二进制格雷码,其法则是保留二进制码的最高位作为格雷码的最高位,而次高位格雷码为二进制码的高 ...
- bzoj 2571: Getting Rid of the Holidays
Description B国的国王Johnny在他在位的短短几年里制定了不少的节日(事实上没超过30个),这些节日是为了尊敬各种各样他所想到的东西而设立的.每过一段固定的时间,一个节日将会被举行(即节 ...
- 史上最详细 Python第三方库添加方法 and 错误解决方法
(1):如何添加python第三方库(方法一): File ->> Settings... ->> Project Interpreter (2):如何添加python第三方库 ...
- VMware新建虚拟机
VMware作为一个非常便捷的虚拟机软件,学会简单的使用方法,对试验非常有帮助. 1. 打开VM,选择“创建新的虚拟机” 2. 选择典型: 3. 选择稍后选择安装源: 4. 选择Linux,并选择Li ...
- CSS 标签实例二
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- javascript节点操作appendChild()
cloneNode(a)方法接受一个布尔值参数,表示是否深拷贝 true:表示执行深拷贝,复制本节点以及整个子节点树. false:浅拷贝.只复制节点本身. 复制后返回的节点副本属于文档所有,但是并没 ...
- pure框架
内容: 1.介绍与入门 2.基础使用 参考资料: pure中文文档:https://www.purecss.cn/ pure实例:https://www.purecss.cn/layouts.html ...
- Python分页转Mybatis pagehelper格式分页
最近工作里遇到一个需求要把之前用Java写的一个http接口替换成用Python写的,出参是带了mybatis pageHelper中PageInfo信息的一个JSON串,而Python这边分页不会涉 ...
- filter vs servlet
主要从如下四个方面介绍他们之间的区别: 1.概念. 2.生命周期. 3.职责. 4.执行过程. 一.概念 ...
- 《汇编语言 基于x86处理器》前五章的小程序
▶ 书中前五章的几个小程序,基本的运算操作,使用了作者的库 Irvine32 和 Irvine64(一开始以为作者网站过期了,各网站上找到的文件大小都不一样,最后发现是要搭梯子 Orz,顺利下载).注 ...