Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Ask Question
I am trying to use HTMLUnitDriver in my selenium test to understand how HTMLUnitDriver works. Kindly help me with resolving the issue.
I have added the below jars to the build path in eclipse
selenium-java-2.53.0 jars
TestNG jar
Added the below jars as these were mentioned in other posts as a solution to the error I encountered. However, the issue remains.
selenium-htmlunit-driver-2.52.0 jar
selenium-server-standalone-2.53.0
Code:
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
import org.testng.annotations.Test;
public class GoogleSearch {
@Test
public void testHTMLUnitDriver() {
HtmlUnitDriver unitDriver = new HtmlUnitDriver();
unitDriver.get("https://www.google.co.uk/");
System.out.println("Title of the page is:" +unitDriver.getTitle());
–
–
–
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit-cssparser</artifactId>
<version>1.2.0</version>
<scope>test</scope>
</dependency>
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.