I am trying to use Selenium Webdriver with Java. I am using Eclipse IDE to implement. Steps performed by me -
1. Created a Java Project
2. Added "selenium-java-2.17.0" in [JavaBuildPath->Library]
3. Added "junit-4.9" in [JavaBuildPath->Library]
4. Wrote my code
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class NewClass {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("
http://www.google.co.in");
}
}
Expected Output - This code should launch Firefox & open google site.
Actual Output - throws error
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)