Could not instantiate class org.openqa.selenium.firefox.FirefoxDriver

4,603 views
Skip to first unread message

nehcy

unread,
May 2, 2015, 11:22:21 PM5/2/15
to thucydid...@googlegroups.com
Hi,
This question might have been asked before, but I searched and couldn't find one, so I post it anyway please bear with me.
I recently started experiencing Thucydides/Serenity. 
  • I started by creating a "net.thucydides:thucydides-jbehave-archetype" maven project, which defaulted to thucydides 0.9.268, in my Windows 8.1 machine
  • I imported the project in eclipse and in Run Configuration set
    • "clean deploy" goals
    • in VM arguments: -Dwebdriver.firefox.driver="C:\Program Files\Mozilla Firefox\firefox.exe"
When run the test I got the errors:

  • 54608 [pool-1-thread-1] ERROR net.thucydides.core.webdriver.WebDriverFacade - FAILED TO CREATE NEW WEBDRIVER_DRIVER INSTANCE class org.openqa.selenium.firefox.FirefoxDriver: Could not instantiate class org.openqa.selenium.firefox.FirefoxDriver
  • net.thucydides.core.webdriver.UnsupportedDriverException: Could not instantiate class org.openqa.selenium.firefox.FirefoxDriver
  • Caused by: org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(C:\Program Files\Mozilla Firefox\firefox.exe) on port 7055; 
Has this happened to anybody? what did I miss here?

thanks for help!

John Smart

unread,
May 2, 2015, 11:26:22 PM5/2/15
to nehcy, thucydid...@googlegroups.com
Hi,

This sounds like an incompatiblity between your version of Firefox and the version of Selenium you are using. Try using the latest version of Serenity, which is bundled with the latest version of Selenium.

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
___________________________________________________
John Smart | Wakaleo Consulting  |  +61 407 247 642
Optimizing your software development process
http://www.wakaleo.com  |  john....@wakaleo.com
___________________________________________________

The dates for the 2014 BDD workshops have been scheduled! Check out our upcoming BDD/TDD Master classes and our Advanced BDD Requirements Workshops, coming soon to Sydney and Melbourne!
___________________________________________________

Jeff Jensen

unread,
May 3, 2015, 1:00:36 AM5/3/15
to John Smart, nehcy, thucydid...@googlegroups.com
We've encountered this issue as John describes.  However, I've seen this error with two of my team members and it wasn't the version issue.  The first resolved only by a reinstall of FF.  The second resolved by adding FF to the path (this did not work for the first person).

nehcy

unread,
May 3, 2015, 9:14:33 AM5/3/15
to thucydid...@googlegroups.com, chen_...@hotmail.com, john....@wakaleo.com
Jeff - 

I've just tried re-installing FF, which I used an older version 34 for the compatibility concern as John suggested, but the problem still lingers; when you said "adding FF to the path", what path do I add FF to?

much appreciated,

Jeff Jensen

unread,
May 3, 2015, 9:38:31 AM5/3/15
to nehcy, thucydid...@googlegroups.com, John Smart
System/OS path.  $PATH or %PATH%

Alex Okrushko

unread,
May 3, 2015, 2:42:00 PM5/3/15
to Jeff Jensen, nehcy, thucydid...@googlegroups.com, John Smart
Make sure that selenium 2.45 or higher is used. There was a bug in FF https://code.google.com/p/selenium/issues/detail?id=8399

nehcy

unread,
May 4, 2015, 10:58:12 PM5/4/15
to thucydid...@googlegroups.com, chen_...@hotmail.com, john....@wakaleo.com, jje...@apache.org
Yeah, selenium 2.45 it is! I added the dependency in the pom:

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-firefox-driver</artifactId>
        <version>2.45.0</version>
    </dependency>

and it worked!
Reply all
Reply to author
Forward
0 new messages