When I run my Selenium tests with Firefox 28.0 I get:
"An exception of type 'OpenQA.Selenium.WebDriverException' occurred in WebDriver.dll but was not handled in user code
Additional information: Unable to determine the current version of FireFox using the registry, please make sure you have installed FireFox correctly"
I successfully ran tests yesterday with Firefox.
I think Firefox auto-updated to 28.0 since yesterday.
Today I'm getting the above error.
I uninstall Firefox and reinstalled but I still get the same exception.
Selenium 2.40 Firefox 28.0 Gallio and MbUnit 3.4
Any ideas on how to fix? I suppose I could switch to IE for testing.
Ed
The error was generated on the call to FireFoxBinary() constructor.
DriverObj = New FirefoxDriver(New FirefoxBinary(), New FirefoxProfile(), TimeSpan.FromMinutes(10))
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.
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))
One possible solution to this would be to manually add the registry key that is being searched for. Normal FireFox builds (non ESR) appear to place a key titled "CurrentVersion" with a string value of the version in the
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Mozilla FireFox
directory. Testing has shown me that when I place a key similar to this but with a string value of the ESR version installed on my system in this location Selenium will work. The caveat is that as this question is rather old I have tested with Selenium 3.0.1. If you would like to try this the your registry key should look like this without the quotes:
Name = "CurrentVersion" and
Value = "45.6.0 ESR (x86 en-US)"
Please keep in mind that this solution will get you by in a pinch, but each time ESR updates you will need to go in and update the key value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With