Element is not clickable at point error in chrome
I see this only in Chrome.
The full error message reads:
"org.openqa.selenium.WebDriverException: Element is not clickable at point (411, 675). Other element would receive the click: ..."
The element that 'would receive the click' is to the side of the element in question, not on top of it and not overlapping it, not moving around the page.
I have tried adding an offset, but that does not work either. The item is on the displayed window without any need for scrolling.
----------------------------------
This is caused by following 2 types:
1.The element is not visible to click.
Use Actions or JavascriptExecutor for making it to click.
By Actions:
WebElement element = driver.findElement(By("element_path"));
Actions actions = new Actions(driver);
actions.moveToElement(element).click().perform():
By JavascriptExecutor:
JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript("scroll(250, 0)"); // if the element is on top.
jse.executeScript("scroll(0, 250)"); // if the element is on bottom.
or
JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript("arguments[0].scrollIntoView()", Webelement);
Then click on the element.
2.The page is getting refreshed before it is clicking the element.
For this, make the page to wait for few seconds.
--------------------
1.The element is not visible at the view point(not seen in the screen)
Try this
JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript("scroll(250, 0)"); // this will scroll up
or
jse.executeScript("scroll(0, 250)"); // this will scroll down
2.Element is not present at the time of execution. Use WebDriverWait to until the element is present.
WebDriverWait wait = new WebDriverWait(driver, 15); wait.until(ExpectedConditions.elementToBeClickable(By.id("ID of the element")));---------------------------
In my python script, I try the second method, details as below
js_="var q=document.body.scrollTop=10000"
driver.execute_script(js_)
Attation: In chrome we should use "document.body.scrollTop", "document.documentElement.scrollTop" doesn't work in chrome
if you want to get the value of scrollTop, may you can try this "var sTop=document.body.scrollTop+document.documentElement.scrollTop;"
Element is not clickable at point error in chrome的更多相关文章
- Selenium => Debugging “Element is not clickable at point” error
[From] http://stackoverflow.com/questions/11908249/debugging-element-is-not-clickable-at-point-error ...
- Message: unknown error: Element is not clickable at point
Message: unknown error: Element is not clickable at point google chrome - Debugging "Element is ...
- python控制selenium点击登录按钮时报错 unknown error: Element is not clickable at point
利用python控制selenium进行一个网页的登录时报错: C:\Users\Desktop\selenium\chrome>python chrome.py selenium.common ...
- python+selenium:点击页面元素时报错:WebDriverException: Message: Element is not clickable at point (1372.5, 9.5). Other element would receive the click: <li style="display: list-item;" id="tuanbox"></li>
遇到一个非常郁闷的问题,终于解决了, 问题是这样的,NN网站的价格计划,每一个价格计划需要三连击才能全部点开,第一个房型的价格计划是可以正确三连击打开的,可是第二个房弄就不行了,报错说不是可点击的 ...
- Element is not clickable at point SeleniumWebdriverException
Element is not clickable at point SeleniumWebdriverException | Selenium Easy http://www.seleniumeasy ...
- 【转】Selenium 报错:Element is not clickable at point的解决办法
天一同学在写Selenium Java脚本时遇到一个问题,登录进入系统之后,要点击左侧的一个菜单,但是执行到该语句时报下面的错误: Firefox中报错如下:org.openqa.selenium.E ...
- Firefox上运行自动化测试脚本提示元素无法点击“WebDriverException: Message: Element is not clickable at point“解决方法
1. Firefox上运行脚本时提示“WebDriverException: Message: Element is not clickable at point (934.316650390625, ...
- selenium在chrome上运行报 Element is not clickable at point (1096, 26)
Firefox上正常运行的脚本在chrome上提示Element is not clickable at point (1096, 26).分析原因,首先肯定不是因为页面元素不存在而无法点击.也不是要 ...
- WebDriverException:Element is not clickable at point - selenium执行过程中遇到的相关报错
Element is not clickable at point (x, y) 这段可以忽略:本文来自 https://www.cnblogs.com/lozz/p/9947430.html 引起这 ...
随机推荐
- 关于线程和junit注入失败的问题
问题: 在使用spring的时候,通常会使用注释@Autowired或@Resource注入java Bean; 但是在碰到线程类和测试类的时候就不支持注入方式了. 定义: 线程类:继承thread或 ...
- [肯定不知道]PeopleSoft中PSADMIN你不知道的秘密
PeopleSoft psadmin工具是用于管理PS App server,process scheduler 和 web server节点的.可以使用一些设置菜单选项来管理或配置上面提到的任何组件 ...
- 关于用node批量修改文件名
关于node环境的配置和环境变量的配置就不再这个细说了 一.首先按需求找到需要使用的模块 fs和path: const fs=require('fs') const path=require('pat ...
- 进阶篇之纯css+字体实现五角星(半颗星)评分
1.前言 之前写了一篇实现五角星打分效果的demo.这个demo用来实现打分效果绰绰有余,那么有时候我们在统计评分的时候,就会有半颗星或者1/3颗星星这样的那要如何实现呢?来来来,纯字体+css实现! ...
- vue2 和 webpack 配置环境使用
http://blog.csdn.net/fungleo/article/details/53171052
- 分享 android 源码
Android精选源码 UI框架 QSkinLoader换肤框架 一款优雅的中国风Android笔记源码 ListView.RecyclerView两种方式实现聊天界面 android仿滴滴时间选择控 ...
- Java基础之类和对象、单例模式、继承
Java类和对象 一般的类只能是public或者default的,若是public的,类名必须和文件名一样.一般在一个文件只写一个类,故这个类一般是加上public. 内部类还可以是private和p ...
- [补档]暑假集训D6总结
考试 不是爆零,胜似爆零= = 三道题,就拿了20分,根本没法玩好吧= = 本来以为打了道正解,打了道暴力,加上个特判分,应该不会死的太惨,然而--为啥我只有特判分啊- - 真的是惨. 讲完题觉得题是 ...
- 一步一步学Vue(十二)
为了提升代码的逼格,之后代码改为Vue文件组件,之前代码虽然读起来容易理解,而且适合在小的项目中使用,但是有如下缺点: 全局定义(Global definitions) 强制要求每个 componen ...
- JSONP 爬虫
作者QQ:1095737364 QQ群:123300273 欢迎加入! 1.mavne 依赖: <!--html 解析 : jsoup HTML parser library @ ...