更新到28.0后无法确定FireFox的当前版本 [英] Unable to determine the current version of FireFox after updated to 28.0

查看:86
本文介绍了更新到28.0后无法确定FireFox的当前版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用Firefox 28.0运行Selenium测试时,我得到:

When I run my Selenium tests with Firefox 28.0 I get:

"WebDriver.dll中发生类型'OpenQA.Selenium.WebDriverException'的异常,但未在用户代码中处理

"An exception of type 'OpenQA.Selenium.WebDriverException' occurred in WebDriver.dll but was not handled in user code

其他信息:无法使用注册表确定当前版本的FireFox,请确保已正确安装FireFox".

Additional information: Unable to determine the current version of FireFox using the registry, please make sure you have installed FireFox correctly"

我昨天成功通过Firefox运行了测试.

I successfully ran tests yesterday with Firefox.

我认为Firefox自昨天起已自动更新为28.0.

I think Firefox auto-updated to 28.0 since yesterday.

今天我遇到了以上错误.

Today I'm getting the above error.

我卸载了Firefox并重新安装,但仍然遇到相同的异常.

I uninstall Firefox and reinstalled but I still get the same exception.

硒2.40 Firefox 28.0 Gallio和MbUnit 3.4

Selenium 2.40 Firefox 28.0 Gallio and MbUnit 3.4

有关如何解决的任何想法?我想我可以切换到IE进行测试.

Any ideas on how to fix? I suppose I could switch to IE for testing.

Ed

推荐答案

在调用FireFoxBinary()构造函数时生成了错误.

The error was generated on the call to FireFoxBinary() constructor.

 DriverObj = New FirefoxDriver(New FirefoxBinary(), New FirefoxProfile(), TimeSpan.FromMinutes(10))

对FirefoxBinary的呼叫进行了三周,因此我不确定为什么昨天决定失败.也许这是Firefox从27到28的自动更新.

The call to FirefoxBinary worked for three weeks so I'm not sure why it decided to fail yesterday. Perhaps it was the auto-update by Firefox from 27 to 28.

解决方案是将文件路径添加到Firefox二进制文件:

The solution was to add the file path to the Firefox binary:

 DriverObj = New FirefoxDriver(New FirefoxBinary("C:\Program Files (x86)\Mozilla Firefox\Firefox.exe"), New FirefoxProfile(), TimeSpan.FromMinutes(10))

这篇关于更新到28.0后无法确定FireFox的当前版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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