3

I have gone through previous questions but did not find anyone else running into my issue.

This simple code hangs

from selenium import webdriver
d = webdriver.Firefox();

The browser gets launched, but it just hangs there. After sometime, it crashes and I get the error

selenium.common.exceptions.WebDriverException: Message: Can't load the profile. 
Profile Dir: /tmp/tmpn_MQnf If you specified a log_file in the 
FirefoxBinary constructor, check it for details.

I have Firefox49 on Ubuntu 14.04 LTS. I had selenium 2.53.6 and reading a previous post, I upgraded to selenium 3.0.0.b3. I also downloaded geckdriver and put it in /usr/bin

It looks like I was still running older version of selenium. But when I uninstalled that and installed selenium 3.0.0.b3, I see the following error -

selenium.‌​common.exceptions.We‌​bDriverException: 
Message: Service geckodriver unexpectedly exited. Status code was: 2 

What am I missing?

James K
  • 3,692
  • 1
  • 28
  • 36
Raju
  • 31
  • 2
  • It looks like I was still running older version of selenium. But when I uninstalled that and installed selenium 3.0.0.b3, I see the following error -------------------------------------------------------------------------------------------selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: 2 – Raju Oct 02 '16 at 18:13
  • Looking at geckdriver.log it says this ->Usage: geckodriver [OPTIONS] geckodriver: Unknown option --port – Raju Oct 03 '16 at 00:06

1 Answers1

0

Try renaming the downloaded Gecko Driver to Wires and Set the Capabilities as mentioned Below.

System.setProperty("webdriver.gecko.driver", "//home//.....//BrowserDrivers//wires");
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
Driver = new MarionetteDriver(capabilities);

I tried with the Above code on FireFox 49 on Linux Ubuntu 14.04 LTS... Code Works Fine For Me in Java.. Also try to downgrade the selenium WebDriver from Beta to 2.53 as Beta version is unstable..

Ag_Yoge
  • 77
  • 1
  • 11