問題描述
我最近將我的 chrome 版本更新到最新版本,即 79.0.3945.130 (Official Build) (64-bit)
并從
我正在使用下面的代碼來選擇一個(gè)值
Select s = new Select(getDriver().findElement(By.id("attribute178")));s.selectByIndex(1);
錯(cuò)誤堆棧跟蹤
<塊引用>Javascript 錯(cuò)誤:無法在文檔"上執(zhí)行elementsFromPoint":提供的雙精度值是無限的.(會(huì)話信息:chrome=79.0.3945.130)構(gòu)建信息:版本:'3.13.0',修訂:'2f0d292',時(shí)間:'2018-06-25T15:24:21.231Z' 系統(tǒng)信息:主機(jī):'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' 驅(qū)動(dòng)信息: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:本地主機(jī):61452},javascriptEnabled:真,networkConnectionEnabled:假,pageLoadStrategy:正常,平臺(tái):MAC,平臺(tái)名稱:MAC,代理:代理(),setWindowRect:真,strictFileInteractability:假,超時(shí):{隱式:0,pageLoad:300000,腳本:30000},unhandledPromptBehavior:關(guān)閉并通知}
之前我使用的是 Chrome 75,一切正常.有沒有人遇到過這個(gè)問題?已在 SO 上發(fā)布與此錯(cuò)誤相關(guān)的問題沒有幫助.
在我的例子中,我在每個(gè)命令監(jiān)聽器中使用 new Actions(driver).moveToElement(element).perform();
命令,因此它將焦點(diǎn)移到正在執(zhí)行的元素上.
這一行導(dǎo)致了上述錯(cuò)誤.對此發(fā)表評論后,它的工作正常.
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.
這篇關(guān)于javascript 錯(cuò)誤:無法在“文檔"上執(zhí)行“elementsFromPoint":提供的雙精度值是非有限的的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!