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 引起这 ...
随机推荐
- zTree-已勾选项id传输到action的解决方案
测试jsp <%@ page language="java" contentType="text/html; charset=utf-8" page ...
- tensorflow softmax应用
---恢复内容开始--- 1.softmax函数 2.tensorflow实现例子 #!/usr/bin/env python # -*- coding: utf-8 -*- import tenso ...
- Everything 使用记录
背景:在windows环境下,使用系统自带的搜索框经常出现搜索不到指定文件的问题,在网上无意发现了这款软件,真的很好用! 1 文件列表 建立文件列表主要是为了以后可以在指定的目录内查找自己想要的文件, ...
- .Net 内存池
最近在开发 Pinpoint .Net 客户端,和服务端通信都是通过 TCP 或者 UDP,需要处理大量的 Byte 数据,使用 .Net Framework 只能通过 new Byte[] 的方式申 ...
- 【原创】-- C# 点滴积累 -- String
一.string.Format() 将[数字字符串]转为两位小数显示的字符串: dt = dtResult.Select(it => new CommodityPriceLimitEntity ...
- 将SpringMVC中的HttpMessageConverter替换为Gson
读者们看到这个标题也许会感到奇怪,SpringMVC中默认的HttpMessageConverter不是Jackson吗,但是我在使用的过程中发现Jackson并不好用,如果有一些复杂的嵌套类型,当然 ...
- java正则表达式提取地址中的ip和端口号
由于我需要用到java正则表达式提取地址中的ip和端口号,所以我就写了一个demo,测试一下,下面是demo public class Test0810_1 { public static void ...
- Fancytree Javascript Tree TreeTable 树介绍和使用
Fancytree是一个非常棒的Javascript控件,功能强大,文档健全.在做Javascript Tree控件选型时,主要基于以下几点选择了Fancytree 在Javascript Tree控 ...
- HPU--1280 Divisible
题目描述 给定一个很大的整数,我想知道它能否被9整除. 输入 有t组测试数据,每组数据给定一个整数N不存在前导0.(1 <= t <= 20,1 <= N <= 10^200) ...
- jQuery相关知识总结一
1day-jquery 1. 1 jQuery 1概念 * JavaScript(ECMA/DOM/BOM)在实际开发中,使用比较麻烦,有浏览器兼容问题. * JavaScript类库(JS库) 的目 ...