Error: FF Browser not working for Selenium test after update

0 votes

On my Ubuntu Desktop 16.04, Selenium WebDriver cannot open browser for testing. Before updating, it was all fine, but after updating Firefox I get the following error:

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.
Apr 20, 2018 in Selenium by kappa3010
• 2,070 points
121 views

1 answer to this question.

0 votes

Since Firefox's latest update to version 47.0, a new driver must be used. Probably because of Mozilla updating their terms and policies of use. To get things running, either use: 

1. Marionatte driver which is an extension to the Firefox browser

DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
Webdriver driver = new FirefoxDriver(capabilities);

2. Use Gecko driver which is the driver provided by Firefox for selenium tests

system.setproperty("webdriver.gecko.driver","path to geckodriver.exe");
WebDriver driver = new FirefoxDriver();
answered Apr 20, 2018 by king_kenny
• 3,650 points

Related Questions In Selenium

0 votes
1 answer
0 votes
0 answers

xpath search working on browser[firefox/Chrome] but not on Selenium python script.

Hi Team, I am getting below expception while ...READ MORE

Nov 14 in Selenium by ashutosh
• 120 points
112 views
0 votes
1 answer

Selenium ChromeDriver issue - Want to run it in background, but not as headless browser

This is a flaw with ChromeDriver. Tried ...READ MORE

answered Mar 26, 2018 in Selenium by nsv999
• 5,430 points
1,353 views
0 votes
1 answer

Selenium XPath error:- Element not found

The reason for Element not found exception ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,430 points
4,676 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,430 points
1,177 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,150 points
1,263 views
0 votes
1 answer
0 votes
1 answer

Selenium Alternatives: Is there a tool like Selenium for testing web pages but which does not involve coding.

I'm guessing you've tried Selenium IDE already. ...READ MORE

answered Apr 13, 2018 in Selenium by king_kenny
• 3,650 points
84 views