OS: OSX
Selenium Version: 2.53.4
Browser: Firefox
Browser Version: 48
Firefox starts and is able to be controlled via Selenium
Firefox starts, but does nothing. After waiting long enough, I see an error like: "`connect_until_stable': unable to obtain stable firefox connection in 60 seconds".
Selenium::WebDriver.for :firefox
Downgrading to Firefox 47.0.1 resolves this issue for me.
Can't fix.
In Firefox 48, Mozilla requires extensions to be signed. They have refused to sign Selenium's Firefox driver extension (webdriver.xpi). Feel free to contact them and/or log an issue for them at https://bugzilla.mozilla.org
The way forward now is to use GeckoDriver. Which is now the default implementation used in 3.0-beta
This issue has been known as a long time coming, I highly recommend pinning your automation to use Firefox 45 ESR until a release of using GeckoDriver/marionette is stable enough for your tests.
Thanks for the speedy response!
Thank you @lukeis
I don't love that this is the solution currently, but you're correct and I appreciate you tremendously right now :)
I still not sure if selenium 2.53.* support geckodriver. As I found Firefox need to use
https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver
Hi @lukeis Do you know which selenium version work with Geckodriver ?
Thanks for answer.
From our experience GeckoDriver / Marionette does not mach the capabilities of SeleniumDriver. So either:
Only Selenium 3 works with GeckoDriver. According to https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver you should be able to download geckodriver and point to it in Selenium 2.53 but I'm not able to do that using Selenium 2.53 with Capybara and Ruby. Capybara doesn't support it and I'm not sure when/if they will. I'm experimenting with Selenium 3 right now. It's working with gecko in that FF browsers are firing up and tests are running. But I have to figure out why all the errors.
@liapretorius Capybara will support selenium with geckodriver when they're feature complete enough to pass Capybaras tests. You can see the current status of those tests using the latest versions of selenium, geckodriver and firefox here - https://travis-ci.org/jnicklas/capybara/jobs/163764567 . All of the failures are caused by currently lacking functionality in the combo of latest selenium, geckodriver, and marionette (No actions API, modal prompt issues, send_keys functionality limitations)
Is their a solution to the fact Selenium crashes instead of detecting or catching the version mismatch? Or do you just have to live with it?
My current solution is I print a note to the user warning them that my software may freeze for a minute and then crash... Try/except does not catch this failure.
i wanted to put in a check for the mismatch... but on windows firefox doesn't appear to support a command line switch to quickly get the version information. so... we have no good cross platform way to detect it.
Supposedly you can fix it with geckodriver on windows. They don't bother to mention it in the instructions, but you have to rename it wires.exe or nothing works. They also don't bother to mention it, but you have to install the latest selenium, or nothing works.
I tried to update selenium with pip from local files since my work proxy is stupid. Oops I need rdflib. Try to install that. Oops I need htmllib5. Try to install that. Oops I need newer easy_install. Try to install that. Oops I need newer setuptools. Try to install that. Oops I need ez_setup. Try to run that. Oops it needs something but it's a secret. Probably "easy_setup_wicked_ez_much_simple..."
Maybe random crashes are just the price you pay for using selenium.
This is the Mozilla Bguzilla issue tracking the migration to Marionette.
@chakrapani555 does GeckoDriver and Selenium 3 work with Firefox 49?
Yeah. Follow the steps in that URL- you should be able to
http://toolsqa.com/selenium-webdriver/how-to-use-geckodriver/
download the latest gecko driver and unzip it and Set System Properties for Gecko Driver
@lukeis you can still use the SeleniumDriver. You don't need Mozilla's review in order to get the addon signed. Change the UUID in install.rdf of the addon to a new generated value and run JPM sign like so.
<Description RDF:about="urn:mozilla:install-manifest" em:id="{681B9050-93CA-11E6-827B-DB5CC7AD2208}"
jpm sign --api-key $MY_AMO_API_KEY_COPIED_FROM_AMO --api-secret $MY_AMO_API_SECRET_COPIED_FROM_AMO --xpi firefox-driver.xpi
@lukeis Here is the signed version of FirefoxWebDriver v2.53.0 installable on FF v48 and FF v53. Test it out and see if it works. I think it is best that the Selenium devs sign their own version and not use mine.
@lencioni I think you can start Selenium with Firefox and manually install the extension in that Firefox profile. I think it should work.
Apparently my signed WebDriver does not work since it keeps getting overridden by the non-signed one provided by Protractor :( Can I reuse the same Firefox profile and not run the WebDriver installation?
As I said before this is a Selenium issue, not a Mozilla issue. This bug is not unfixable!
For anybody interested in running WebDriver in Firefox 48+, all the fun is over at issue #2942. Please follow, test, contribute if you can.
Short story: it takes a few minutes to sign an addon. The tricky part is making it part of the Selenium's crazy funny Rake+jar build system.
I managed to run Protractor tests with the latest Firefox and my own webdriver. more info here
Summary: Selenium-3 is not backwards compatible for FF-48+/geckodriver configuration.
There is a special Mozilla Firefox Developer Edition now. This edition allows running unsigned extensions and works fine with the classic Selenium Firefox driver. Even the Selenium RC runner works without problems in the latest version of this Firefox version (54).
You can find it here: https://www.mozilla.org/en-US/firefox/developer/
The problem never was addon signing. I signed a ton of addions, even WebDriver. The problem is that Selenium devs do not want to invest time in Firefox. I really am sorry they do not have time to work on this :(
Note that there are some version dependencies when using the same Firefox installation also with the new Gecko driver. The classic driver should work with any version that doesn't check for a Mozilla signature, but a newer version of Firefox will require newer version of the Gecko driver as well. This is especially true with the Firefox Developer versions. Newer versions of the Gecko driver also require a newer Selenium version.
I've created a repository for RHEL/CentOS 7 builds of Firefox 52 ESR without the Mozilla signature checking:
https://copr.fedorainfracloud.org/coprs/jschwart/firefox-allext/
This build has been verified to work with:
Selenium RC (2.53)
Classic driver (3.0, 3.4)
Gecko driver, 0.14.0 (which will work with at least Selenium 3.0) and also with 0.16.1 (which will work with Selenium 3.4)
I expect that this build is compatible with pretty much any Selenium driver/version combination.
@jschwartzenberg do you think you can set a specific version of WebDriver instead of the one by default? Can you set the path to it somehow. I tried but Selenium always sets a brand new profile with a new webdriver. I want to trick Selenium into using my signed WebDriver instead of the unsigned one.
@andreicristianpetcu I've looked into overriding the Firefox extension initially. There is an option to specify a Firefox profile which Selenium then uses as a template for its new profile. I don't know what would happen if you put your signed extension into this template profile. Another option would be to rebuild the Selenium package.
Is there a specific reason you have to run your tests against a general release build of Firefox?
We tried to give Firefox+GeckoDriver another chance since a lot of stuff landed in Firefox recently and now we run our Protractor tests with Firefox 55 in headless mode. No extension. Pretty sweet!
I would advice anybody following this ticket who still runs an old Firefox version with WebDriver or stopped running tests against Firefox at all to try again. Especially since headless mode landed!
You can either set the MOZ_HEADLESS=1 or run with the --headless parameter. I think v55 only works on GNU/Linux in headless mode but so does our Jenkins :)
This error still occurs to me, even though I am at the newest version of geckodriver and selenium. Is there no other way than downgrading?
:point_up: Could you perhaps open a new ticket. As this one is over a year old. Try to avoid commenting on old posts, and instead link to them (In Github if you type # then the issue number it should link to it)
Most helpful comment
Can't fix.
In Firefox 48, Mozilla requires extensions to be signed. They have refused to sign Selenium's Firefox driver extension (webdriver.xpi). Feel free to contact them and/or log an issue for them at https://bugzilla.mozilla.org
The way forward now is to use GeckoDriver. Which is now the default implementation used in 3.0-beta
This issue has been known as a long time coming, I highly recommend pinning your automation to use Firefox 45 ESR until a release of using GeckoDriver/marionette is stable enough for your tests.