60秒内无法获得稳定的Firefox连接(127.0.0.1:7055)Ubuntu。

13

我之前可以用Selenium控制Firefox浏览器,但今天早上当我运行我的测试时,遇到了同样的错误。我更新了selenium-webdriver到当前版本(2.38),但仍然出现相同的错误。

Selenium::WebDriver::Error::WebDriverError:
unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)
# /home/user/.rvm/gems/ruby-2.0.0-p195@taxand/gems/selenium-webdriver-2.38.0/lib/selenium/webdriver/firefox/launcher.rb:79:in `connect_until_stable'

同时

我在我的另一个项目中检查了它,那里有2.35版本,昨天也可以运行 - 但今天也无法运行; o

所以我认为这不是selenium的问题,而是我的Firefox可能出了问题?但我还尝试使用自定义firefox_path来运行旧版本的Firefox,问题仍然存在 :<

有任何想法吗?

1个回答

23

在我更新Firefox 26之后,我在Mac OS X Mavericks中发现了相同的问题。

通过更新selenium-webdriver gem,我解决了这个问题。

在你的gemfile中,将当前的selenium-webdriver gem行替换为

gem“selenium-webdriver”,“〜> 2.38.0”

在控制台中,运行gem update selenium-webdriver

然后运行bundle install

尝试运行测试。


谢谢@Dmtri - 对我有用。你是否也注意到,在selenium-webdriver无法连接Firefox后,你失去了在Chrome上滚动的能力?超级奇怪。 - joshs
很遗憾,我以前没有在Chrome上使用过它。 - Jason Kim
这对我在Windows上也起作用了。谢谢@dmtri.com - Franco
即使使用了2.38.0版本,我仍然偶尔会出现错误。 - joshs
1
请查看发布说明,了解特定 selenium-webdriver gem 版本支持哪些 FF 版本:最新的 2.43.0 版本支持 FF 32 -- https://selenium.googlecode.com/git/rb/CHANGES - Jeremy Ferguson
1
我在使用selenium-webdriver 2.42.0和FF 32时遇到了这个错误。更新到selenium-webdriver 2.43.0后,问题得到了解决。 - genegc

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接