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执行过程中遇到的相关报错的更多相关文章

  1. 【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 ...

  2. selenium自动化过程中如何操作Flash动画

    最近在看python的爬虫框架(scrapy),一个词概括就是:"酸爽"!等把selenium自动化版块讲完后,打算写一写关于scrapy相关的知识,打算从源码角度解析下scrap ...

  3. python3 + selenium 运行过程中进行截图

    使用driver.get_screenshot_as_file方法("D:/aaac.png")括号中为需要存放的路径及图片名称 from selenium import webd ...

  4. 解决python 导入selenium 库后自动化运行成功但是报错问题

    本章节开始进入自动化的基础教学了,首先我们要对我们的工具有一定的熟练使用程度,做自动化常用的工具一个是搭建 RobotFramework自动化框架,另外一个便是我们最常用的python 工作原理是比较 ...

  5. selenium使用过程中遇到的“element not visiable”错误

    PS:本博客selenium分类不会记载selenium打开浏览器,定位元素,操作页面元素,切换到iframe,处理alter.confirm和prompt对话框这些在网上随处可见的信息:本博客此分类 ...

  6. Element UI 中组件this.$message报错

    最近在做毕设的时候,用Element UI中的消息提示message一直报以下的错误: 展示的效果也不好看,没有图标什么的: 但我明明有在main.js引入了element-ui 呀,因为毕设时间很赶 ...

  7. 尝试用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 ...

  8. selenium自动化过程中遇到的小问题(未完待续)

    1.chrome浏览器调用不起来 代码没出错的情况下,检查下chrome浏览器的版本与chromedriver.exe的版本是否匹配;下面的表格是根据网上及官网整理的chromedriver与chro ...

  9. selenium+python自动化85-python3.6上SendKeys报错用PyUserInput取代

    前言 python2上安装SendKeys库,对于不好定位的元素,用快捷键操作是极好的,那么在3.6上安装时,会报错 python3.6安装SendKeys报错 1.python3.6安装SendKe ...

随机推荐

  1. bzoj 2601: [Jsoi2011]同分异构体计数

    Description Antonio 最近对有机化学比较感兴趣,他想请你帮助他快速计算出某种烃类的同分异 构体的数目.  为了表述方便,我们作出如下定义:    环烷烃: 具有n 个碳原子的环烷烃可 ...

  2. shell打印彩色输出

    字体颜色(8种,3开头) 重置=0,黑色=30,红色=31,绿色=32, 黄色=33,蓝色=34, 洋红=35, 青色=36, 白色=37. 背景颜色(8种,4开头) 重置=0,黑色=40,红色=41 ...

  3. 小峰servlet/jsp(2)

    一.jsp javaBean组件引入 <jsp:useBean id="实例化对象名称" scope="保存范围" class="类完整名称&q ...

  4. [转]Java.APK 反编译

    本文转自:http://blog.csdn.net/vipzjyno1/article/details/21039349/ (注:反编译不是让各位开发者去对一个应用破解搞重装什么的,主要目的是为了促进 ...

  5. Linux期中架构 全网备份案例

    server端脚本 #!/bin/bash #1 进行数据完整性验证 并生成结果 find /backup -type f -name "finger.txt"| xargs md ...

  6. 1116 Come on! Let's C (20 分)

    1116 Come on! Let's C (20 分) "Let's C" is a popular and fun programming contest hosted by ...

  7. pyplot 绘图与可视化

    1. 基本使用 #!/usr/bin/env python # coding=utf-8 import matplotlib.pyplot as plt from numpy.random impor ...

  8. xgboost的遗传算法调参

    遗传算法适应度的选择: 机器学习的适应度可以是任何性能指标 —准确度,精确度,召回率,F1分数等等.根据适应度值,我们选择表现最佳的父母(“适者生存”),作为幸存的种群. 交配: 存活下来的群体中的父 ...

  9. Quectel module USB driver for linux

    The environment settings are as follows: 1. ubuntu 14.04 , linux kernel: linux-lts-xenial-4.4.0 2. m ...

  10. Mysql导出表结构、表数据

    导出 (cmd)     1.导出數據库為dbname的表结构(其中用戶名為root,密码為dbpasswd,生成的脚本名為db.sql)    mysqldump -u root -p dbpass ...