java 无法读取 VR 路径注册表 - Selenium Webdriver

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/47908938/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-03 09:51:33  来源:igfitidea点击:

Unable to read VR Path Registry - Selenium Webdriver

javaseleniumfirefoxwebdriver

提问by eeadev

I am trying to execute a test case using Selenium and java but the page does not load completely and I am getting this message in my eclipse console:

我正在尝试使用 Selenium 和 java 执行测试用例,但页面没有完全加载,我在 eclipse 控制台中收到此消息:

Unable to read VR Path Registry

无法读取 VR 路径注册表

What does this message mean?

这个消息是什么意思?

Here is the code:

这是代码:

FirefoxDriver driver = new FirefoxDriver();
try {
    driver.get(url);
    WebDriverWait wait = new WebDriverWait(driver, 10);
    driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS);

    wait.until(ExpectedConditions.visibilityOfElementLocated(By.id(idName)));
...

Here is the console:

这是控制台:

1513781293556   Marionette  INFO    Enabled via --marionette
    Unable to read VR Path Registry from C:\Users\jo\AppData\Local\openvr\openvrpaths.vrpath
    [Parent 12932, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
    Unable to read VR Path Registry from C:\Users\jo\AppData\Local\openvr\openvrpaths.vrpath
    [Child 8784, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
    [Child 8784, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
    1513781295106   Marionette  INFO    Listening on port 54019
    1513781295991   Marionette  WARN    TLS certificate errors will be ignored for this session
    1513781296065   Marionette  DEBUG   Register listener.js for window 4294967297
    dic 20, 2017 3:48:16 PM org.openqa.selenium.remote.ProtocolHandshake createSession
    INFO: Detected dialect: W3C
    1513781296124   Marionette  DEBUG   Received DOM event "beforeunload" for "about:blank"
    1513781297500   Marionette  DEBUG   Received DOM event "pagehide" for "about:blank"
    1513781297501   Marionette  DEBUG   Received DOM event "unload" for "about:blank"
    1513781306755   Marionette  DEBUG   Received DOM event "pageshow" for "[URL]"
    1513781311436   Marionette  DEBUG   Received DOM event "DOMContentLoaded" for "[URL]"
    Unable to read VR Path Registry from C:\Users\jo\AppData\Local\openvr\openvrpaths.vrpath
    JavaScript warning: [URL]_Incapsula_Resource?SWJIYLWA=719d34d31c8e3a6e6fffd425f7e032f3&ns=46&cb=1899153169, line 1: unreachable code after return statement
    JavaScript warning:[URL]?SWJIYLWA=719d34d31c8e3a6e6fffd425f7e032f3&ns=46&cb=1899153169 line 1 > eval, line 1: unreachable code after return statement
    1513781320494   Marionette  DEBUG   Received DOM event "pageshow" for "https://www.url.it/it/adesione?zoneid=home-box_offerta#!"
    1513781321091   Marionette  DEBUG   Register listener.js for window 4294967317
    test failure Expected condition failed: waiting for visibility of element located by By.id: ITA_IFM_First_Name__c (tried for 10 second(s) with 500 MILLISECONDS interval)
    Unable to read VR Path Registry from C:\Users\jo\AppData\Local\openvr\openvrpaths.vrpath
    [Child 2004, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
    [Child 2004, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346

Testing another site, there is no such problem with Firefox.

测试另一个站点,Firefox 没有这样的问题。

采纳答案by Corey Goldberg

Unable to read VR Path Registry

无法读取 VR 路径注册表

that's not what is causing your failure.

这不是导致你失败​​的原因。

There is a clear error message stating:

有一条明确的错误消息指出:

test failure Expected condition failed: waiting for visibility of element located by By.id: ITA_IFM_First_Name__c

You are waiting for visibility of the element with id "ITA_IFM_First_Name__c"... which doesn't appear before the timeout is reached.

您正在等待 ID 为“ITA_IFM_First_Name__c”的元素的可见性...在超时之前不会出现。

回答by Ali Azam

Download the required version of gecodriverfrom here. and initialize your firefoxdriver like below:

gecodriver这里下载所需的版本。并初始化您的firefox驱动程序,如下所示:

System.setProperty("webdriver.gecko.driver", "/PATH/TO/geckodriver.exe");
FirefoxDriver driver = new FirefoxDriver();

回答by Asma Ahmed

I found the same issue and it's resolved by using old gecko driver which is V0.19.1. I was lately using gecko driver v0.20.0

我发现了同样的问题,并通过使用 V0.19.1 的旧 Gecko 驱动程序解决了这个问题。我最近在使用 gecko 驱动程序 v0.20.0

回答by Khachornchit Songsaen

I found same issue earlier but find not found any problem yet after using geckodriver-v0.19.1 currently.

我之前发现了同样的问题,但在目前使用 geckodriver-v0.19.1 后还没有发现任何问题。

回答by Srikanth Reddy

//set geckodriver path
System.setProperty("webdriver.gecko.driver","C:\geckodriver.exe");

// Suppress logs with warning
System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE,"/dev/null");

// initialize Firefox driver object to open Firefox browser
WebDriver driver = new FirefoxDriver();