package tests;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.Test;
@Test
public class Example {
public void name() {
WebDriver driver = new FirefoxDriver();
driver.findElement(By.linkText("MAPS")).click();
}
}
on running this it gives error :
java.lang.NoClassDefFoundError: org/apache/http/NoHttpResponseException
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:81)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:244)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:110)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:190)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:183)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:179)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:92)
I google it and found that I need to add org.apache.httpcomponents.httpclient_4.2.5.jar file in my build path, but that didnt work
Please let me know , how to fix this. I have attached library screenshot , just to make sure I am not missing any important jar file.
