21

I try to get started with selenium (downloaded the current version today) and copied their example which opens a browser and performs a google search.

However, the program hangs forever in the 1st line WebDriver driver = new FirefoxDriver();.

I have Firefox 13 installed.

Thread dump:
Thread [main]
  Thread.sleep(long) line: not available [native method] [local variables unavailable]
  FirefoxBinary.sleep(long) line: 218
  FirefoxBinary.clean(FirefoxProfile, File) line: 234
  NewProfileExtensionConnection.start() line: 76
  FirefoxDriver.startClient() line: 200
  FirefoxDriver(RemoteWebDriver).(CommandExecutor, Capabilities) line: 94
  FirefoxDriver.(FirefoxBinary, FirefoxProfile) line: 147
  FirefoxDriver.() line: 85
  Test.main(String[]) line: 24
Andrei Botalov
  • 20,686
  • 11
  • 89
  • 123
stracktracer
  • 1,862
  • 5
  • 24
  • 37

5 Answers5

23

These cases are usually when Firefox & Selenium are a little "out of sync" in terms of compatibility.

You should try two things: update Selenium to the latest one and/or downgrade Firefox. Keeping an eye on the Selenium Release Notes

Community
  • 1
  • 1
Arran
  • 24,648
  • 6
  • 68
  • 78
3

Firefox 13 support was added in Selenium 2.23. See http://code.google.com/p/selenium/source/browse/trunk/java/CHANGELOG

user405935
  • 585
  • 1
  • 5
  • 10
0

Normally a new browser's hot - I was looking for a problem elsewhere. Webdriver or selenium server. http://d.pr/i/Q5Dt

RDPanek
  • 96
  • 4
0

I've been working OK with Firefox 18, but I just got auto-updated to 19 which seems to break the webdriver. Mozilla isn't prominent with the links to prior versions:

https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/18.0b7/mac/en-US/

Steve
  • 836
  • 11
  • 14
0

Saw this behavior when trying to instantiate the webdriver on a headless CentOS server without display being set.

Per https://serverfault.com/questions/363827/how-can-i-run-firefox-on-centos-with-no-display -- you can use Xvfb, which gives you an X server that doesn't require connection to a physical display

storm_m2138
  • 2,281
  • 2
  • 20
  • 18
  • Whilst this may theoretically answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – GhostCat Aug 09 '17 at 18:57