When you are getting the following exception during firefoxdriver initialization:

java.lang.NoSuchMethodError: org.openqa.selenium.Proxy.extractFrom(Lorg/openqa/selenium/Capabilities;)Lorg/openqa/selenium/Proxy;
        at org.openqa.selenium.firefox.FirefoxDriver.dropCapabilities(FirefoxDriver.java:313)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
        at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:103)
        at test.java.com.ch.forsight.main.TestBase.getLocalDriver(TestBase.java:85)
        at test.java.com.ch.forsight.main.TestBase.createDrivers(TestBase.java:72)  

try to put this dependency into pom.xml:

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

If you still getting the same exception you should try to experiment with the order of the imports.
Sometimes small order changes can make the project work again, who knows which one depends on an old utility…

Posted By Tihomir Turzai

Leave a Reply




XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>