javascript错误:无法在“文档"上执行"elementsFromPoint":提供的双精度值是非限定的 [英] javascript error: Failed to execute 'elementsFromPoint' on 'Document': The provided double value is non-finite

查看:1214
本文介绍了javascript错误:无法在“文档"上执行"elementsFromPoint":提供的双精度值是非限定的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将chrome版本更新为最新版本,即79.0.3945.130 (Official Build) (64-bit),并从

I recently updated my chrome version to latest i.e. 79.0.3945.130 (Official Build) (64-bit) and downloaded compatible chromedriver from here

我已经开始面对这个错误.在详细调试时,我发现Select类引起了问题.无论我在代码的哪个位置选择下拉菜单,都会遇到此问题.

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.

下拉菜单的HTML类似于以下代码段:

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>

网页上的下拉菜单:

我正在使用下面的代码选择一个值

I'm using below code to select a value

Select s = new Select(getDriver().findElement(By.id("attribute178")));
s.selectByIndex(1);

错误堆栈跟踪

Javascript错误:无法在文档"上执行"elementsFromPoint": 提供的double值是非限定的. (会话信息: 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, 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: 否,pageLoadStrategy:正常,平台:MAC,platformName:MAC, proxy:Proxy(),setWindowRect:true,strictFileInteractability:false, 超时:{隐式:0,pageLoad:300000,脚本:30000}, unhandledPromptBehavior:关闭并通知}

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}

我以前使用的是Chrome 75,并且一切正常.有人遇到过这个问题吗?与SO上的此错误相关的已发布问题没有帮助.

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.

推荐答案

在我的情况下,我在每个命令之前的命令侦听器中使用new Actions(driver).moveToElement(element).perform();,因此它将焦点移到要执行的元素上.

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":提供的双精度值是非限定的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆