javascript error: Failed to execute #39;elementsFromPoint#39; on #39;Document#39;: The provided double value is non-finite(javascript 错误:无法在“文档上执行“elementsFromPoint:提供的双精度值是非有限的)
问题描述
我最近将我的 chrome 版本更新到最新版本,即 79.0.3945.130 (Official Build) (64-bit) 并从 
我正在使用下面的代码来选择一个值
Select s = new Select(getDriver().findElement(By.id("attribute178")));s.selectByIndex(1);错误堆栈跟踪
<块引用>Javascript 错误:无法在文档"上执行elementsFromPoint":提供的双精度值是无限的.(会话信息:chrome=79.0.3945.130)构建信息:版本:'3.13.0',修订:'2f0d292',时间:'2018-06-25T15:24:21.231Z' 系统信息:主机:'ispl_723.test.com', ip: 'fe80:0:0:0:419:64fe:5dea:dae5%en0',os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6',java.version: '1.8.0_191' 驱动信息:com.qmetry.qaf.automation.ui.webdriver.QAFExtendedWebDriver功能 {acceptInsecureCerts: false, browserName: chrome,浏览器版本:79.0.3945.130,铬:{chromedriverVersion:79.0.3945.36 (3582db32b3389..., userDataDir:/var/folders/qf/x6bn9cgj1rx...}, goog:chromeOptions: {debuggerAddress:本地主机:61452},javascriptEnabled:真,networkConnectionEnabled:假,pageLoadStrategy:正常,平台:MAC,平台名称:MAC,代理:代理(),setWindowRect:真,strictFileInteractability:假,超时:{隐式:0,pageLoad:300000,脚本:30000},unhandledPromptBehavior:关闭并通知}
之前我使用的是 Chrome 75,一切正常.有没有人遇到过这个问题?已在 SO 上发布与此错误相关的问题没有帮助.
在我的例子中,我在每个命令监听器中使用 new Actions(driver).moveToElement(element).perform();命令,因此它将焦点移到正在执行的元素上.
这一行导致了上述错误.对此发表评论后,它的工作正常.
I recently updated my chrome version to latest i.e. 79.0.3945.130 (Official Build) (64-bit) and downloaded compatible chromedriver from here
I've started facing this error. While debugging in detail i found that the Select class causing the issue. wherever I'm selecting a dropdown in my code I'm getting this issue.
The HTML of dropdown looks like below snippet:
<div class="rd-input--wrapper" id="178">
    <label for="attribute178">Flavour</label>
    <select name="super_attribute[178]" data-selector="super_attribute[178]" data-validate="{required:true}" id="attribute178" class="super-attribute-select">
        <option value="">Select</option>
        <option value="27">Chocolate</option>
        <option value="28">Strawberry</option>
    </select>
</div>
And dropdown on Webpage:
I'm using below code to select a value
Select s = new Select(getDriver().findElement(By.id("attribute178")));
s.selectByIndex(1);
Error stacktrace
Javascript error: Failed to execute 'elementsFromPoint' on 'Document': The provided double value is non-finite. (Session info: chrome=79.0.3945.130) Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:24:21.231Z' System info: host: 'ispl_723.test.com', ip: 'fe80:0:0:0:419:64fe:5dea:dae5%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.6', java.version: '1.8.0_191' Driver info: com.qmetry.qaf.automation.ui.webdriver.QAFExtendedWebDriver Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 79.0.3945.130, chrome: {chromedriverVersion: 79.0.3945.36 (3582db32b3389..., userDataDir: /var/folders/qf/x6bn9cgj1rx...}, goog:chromeOptions: {debuggerAddress: localhost:61452}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: MAC, platformName: MAC, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
Earlier I was using Chrome 75 and everything was working as expected. Has anyone faced this issue? Already posted question related to this error on SO is not helpful.
In my case i was using new Actions(driver).moveToElement(element).perform(); in Command Listener before each command so it move the focus on element which being executed. 
This line causing the error mentioned in question. After commenting this its working fine.
这篇关于javascript 错误:无法在“文档"上执行“elementsFromPoint":提供的双精度值是非有限的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:javascript 错误:无法在“文档"上执行“elementsFromPoint":提供的双精度值是非有限的
				
        
 
            
        基础教程推荐
- Java 实例变量在两个语句中声明和初始化 2022-01-01
 - Java Swing计时器未清除 2022-01-01
 - 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01
 - 验证是否调用了所有 getter 方法 2022-01-01
 - 多个组件的复杂布局 2022-01-01
 - 大摇大摆的枚举 2022-01-01
 - 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
 - 不推荐使用 Api 注释的描述 2022-01-01
 - 在 Java 中创建日期的正确方法是什么? 2022-01-01
 - 从 python 访问 JVM 2022-01-01
 
    	
    	
    	
    	
    	
    	
    	
    	
						
						
						
						
						
				
				
				
				