問題描述
我最近將我的 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":提供的雙精度值是非有限的的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!