I use Selenium WebDriver on Ubuntu Desktop 16.04, and I can't open browser. I get the following error after Firefox update (before this, it all worked):
Traceback (most recent call last):
File "test.py", line 6, in <module>
driver = webdriver.Firefox()
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/webdriver.py", line 81, in __init__
self.binary, timeout)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 51, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser
self._wait_until_connectable(timeout=timeout)
File "/usr/local/lib/python3.5/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 98, in _wait_until_connectable
raise WebDriverException("The browser appears to have exited "
selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.
As of Firefox version 47.0 (which came out a little while a go), a new driver must be used (created by mozilla instead of selenium) to connect to Firefox, because of a bug introduces in this version. As of Firefox version 48.0 the old driver will be deprecated completely and only Marionette can be used so it is better to switch now. See: Marionette Webdriver for Firefox
Download the driver (in OSX just use
brew install geckodriver
), rename the executable towires.exe
on windows, orwires
on *nix systems, and make sure the executable is present in your system path, then use this driver in your program instead of the old driver by using the following:When using a local webdriver:
Python:
Ruby:
Javascript:
Java:
C#:
When using selenium grid:
When using a selenium grid the driver should be present in the path for all machines in your grid.
Python:
Ruby:
Java:
C#:
Solution : Upgrade Firefox to 47.0.1 and Selenium to 2.53.1.
This combination worked for me.
For more details refer to https://stackoverflow.com/a/37728659/6469532
No need to downgrade Firefox. I have faced issue with Windows and Firefox 49 version. I was using geckodrvier 64 bit version. I changed it to geckodrvier 32 bit version and it solved the issue. Now browser is opening properly without any issue.
1) Download geckodriver 0.6.2, unzip, rename to "wires" not "wires.exe" https://github.com/mozilla/geckodriver/releases
2) Add the wires executable location to PATH (I put this in my python folder C:Program Files\Python...) Select Start, select Control Panel. double click System, and select the Advanced tab. Click Environment Variables. ... In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. ... (Use ';' to separate paths i.e. [C:Users\Reuben;C:Program Files\Python]
3) Downgrade to Firefox 45 https://ftp.mozilla.org/pub/firefox/releases/45.0.2/win64/en-US/
FIXED: Solution at this time is to downgrade Firefox! run this command to get a list of available Firefox versions.
My Result:
Install:
To keep this version and disallow updates:
If you want to unhold firefox version and allow updates:
Some people have the problem that some
button
s orselect
boxes cannot be selected inmarionette
modus.An alternative is using older firefox version:
You can download the binary here and use it here: