【发布时间】:2019-02-12 13:28:58
【问题描述】:
无法使用 Selenium(3.11)、GeckoDriver(0.24.0)、Firefox(57 版本)运行 selenium javascript:
获取 java.lang.NullPointerException
2019 年 2 月 12 日下午 6:49:21 org.openqa.selenium.remote.DesiredCapabilities firefox 信息:使用
new FirefoxOptions()优于DesiredCapabilities.firefox()1549977563169 mozrunner::runner INFO 运行命令:“C:\Program Files \Mozilla Firefox\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\Users\VINNAKP\AppData\Local\Temp\rust_mozprofile.CC0uDeBQr5aF" 无法读取 VR 路径注册表从 C:\Users\VINNAKP\AppData\Local\openvr\openvrpaths.vrpath 1549977563829 Marionette INFO 通过 --marionette 启用 无法从 C:\Users\VINNAKP\AppData\Local\openvr\openvrpaths.vrpath 读取 VR 路径注册表从 C:\Users\VINNAKP\AppData\Local\openvr\openvrpaths.vrpath 读取 VR 路径注册表无法从 C:\Users\VINNAKP\AppData\Local\openvr\openvrpaths.vrpath 读取 VR 路径注册表 [子 16780,Chrome_ChildThread]警告:管道错误:109:文件 z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc,第 346 行 [Child 16780,Chrome_ChildThread] WARUnable to read VR Path来自 C:\Users\VINNAKP\AppData\Local\openvr\openvrpaths.vrpath 的注册表 1549977565363 Marionette INFO Listening on port 54976 1549977565426 Marionette WARN TLS 证书错误将被忽略此会话 1549977565494 Marionette DEBUG 为窗口 4294967297 注册 listener.js 2019 年 6:49:25 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C**
【问题讨论】:
-
这个文件存在吗?
C:\Users\VINNAKP\AppData\Local\openvr\openvrpaths.vrpath -
DesiredCapabilities 能力 = DesiredCapabilities.firefox();能力.setCapability(“木偶”,真); System.setProperty("webdriver.gecko.driver", System.getProperty("user.dir") + pathDriver + "geckodriver.exe"); @SuppressWarnings("deprecation") WebDriver driver = new FirefoxDriver(capabilities); // 打开应用程序 url SeleniumUtils.getDriver().navigate().to(String.valueOf(CONFIG.getProperty("applicationURL")));
-
文件夹“C:\Users\VINNAKP\AppData\Local\openvr”不存在
-
那是你的问题
-
我能做些什么来解决这个问题?
标签: java selenium firefox gecko