HTMLUnit Driver is not initiating

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

HTMLUnit Driver is not initiating

Muaaz
Hi Guys ,
I am trying to use HTML Unit Driver , but i am not able to initiate the driver unfortunately. I found following error message.

Please let me know what is the solution. I tried with latest webdriver jar and htmlUnit-2.13 jar as well.

java.lang.NoSuchMethodError: com.gargoylesoftware.htmlunit.WebClient.getOptions()Lcom/gargoylesoftware/htmlunit/WebClientOptions;  
Reply | Threaded
Open this post in threaded view
|

Re: HTMLUnit Driver is not initiating

BVandeputte
This post was updated on .
Hi
I had exaclty the same issue.
So I finally found a fix and I posted this fix here (google group) forum/selenium-users.

Here is my final pom configuration to make selenium working with the correct deps (htmlunit 2.15 and httpcore 4.3.2) :


my pom.xml wrote
               
                <dependency>
                        <groupId>org.seleniumhq.selenium</groupId>
                        <artifactId>selenium-java</artifactId>
                        <version>2.42.2</version>
                        <exclusions>
                                <exclusion>
                                        <groupId>net.sourceforge.htmlunit</groupId>
                                        <artifactId>htmlunit</artifactId>
                                </exclusion>
                                <exclusion>
                                        <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpcore</artifactId>
    </exclusion>
                        </exclusions>
                </dependency>
                <dependency>
                    <groupId>net.sourceforge.htmlunit</groupId>
                    <artifactId>htmlunit</artifactId>
                    <version>2.15</version>
                </dependency>
                <dependency>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpcore</artifactId>
                    <version>4.3.2</version>
                </dependency>
Hope this helps
Regards