Hi I am working on Java & am using HtmlUnitDriver.I have created the object
`WebDriver webDriver = new HtmlUnitDriver(true);`
I am using selenium-htmlunit-driver-2.24.1.jar & selenium-java-2.24.1.jar.
When I run my code I am getting following exception.
Exception in thread "Thread-5" java.lang.NoClassDefFoundError: org/openqa/selenium/internal/FindsByCssSelector
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Please guide me how to solve this issue.If there is jar for this Exception then which Jar should I use?
Make sure that all the relevant jars (such as package and library jars) are in the class path. Always make sure to clean and recompile the project once you copied jars.
[You can use a jar search engine to find jars of missing classes.][1] [http://www.jarvana.com/jarvana/search?search_type=class&java_class=org.openqa.selenium.internal.FindsByCssSelector][1]
Note : It is always advisable to use jars from official release, because of possible compatibility issues due to version difference.