Selenium 挂起实例化 FirefoxDriver [英] Selenium hangs instantiating FirefoxDriver

查看:28
本文介绍了Selenium 挂起实例化 FirefoxDriver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试开始使用 selenium(今天下载了当前版本)并复制了他们的示例,该示例打开浏览器并执行谷歌搜索.

然而,程序永远挂在第一行WebDriver driver = new FirefoxDriver();.

我安装了 Firefox 13.

<前>线程转储:主题 [主要]Thread.sleep(long) 行:不可用 [本地方法] [局部变量不可用]FirefoxBinary.sleep(长)行:218FirefoxBinary.clean(FirefoxProfile, File) 行:234NewProfileExtensionConnection.start() 行:76FirefoxDriver.startClient() 行:200FirefoxDriver(RemoteWebDriver).(CommandExecutor, Capabilities) 行:94FirefoxDriver.(FirefoxBinary, FirefoxProfile) 行:147FirefoxDriver.() 行:85Test.main(String[]) 行:24

解决方案

这些情况通常是在 Firefox &Selenium 在兼容性方面有点不同步".

您应该尝试两件事:将 Selenium 更新到最新版本和/或降级 Firefox.密切关注 Selenium 发行说明

I try to get started with selenium (downloaded the current version today) and copied their example which opens a browser and performs a google search.

However, the program hangs forever in the 1st line WebDriver driver = new FirefoxDriver();.

I have Firefox 13 installed.

Thread dump:
Thread [main]
  Thread.sleep(long) line: not available [native method] [local variables unavailable]
  FirefoxBinary.sleep(long) line: 218
  FirefoxBinary.clean(FirefoxProfile, File) line: 234
  NewProfileExtensionConnection.start() line: 76
  FirefoxDriver.startClient() line: 200
  FirefoxDriver(RemoteWebDriver).(CommandExecutor, Capabilities) line: 94
  FirefoxDriver.(FirefoxBinary, FirefoxProfile) line: 147
  FirefoxDriver.() line: 85
  Test.main(String[]) line: 24

解决方案

These cases are usually when Firefox & Selenium are a little "out of sync" in terms of compatibility.

You should try two things: update Selenium to the latest one and/or downgrade Firefox. Keeping an eye on the Selenium Release Notes

这篇关于Selenium 挂起实例化 FirefoxDriver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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