Senhores,
estou recebendo o seguinte erro:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/auth/Credentials at org.openqa.selenium.remote.HttpCommandExecutor.getDefaultClientFactory(HttpCommandExecutor.java:96) at org.openqa.selenium.remote.HttpCommandExecutor.(HttpCommandExecutor.java:70) at org.openqa.selenium.remote.HttpCommandExecutor.(HttpCommandExecutor.java:58) at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:87) at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:271) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:119) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:216) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:211) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:207) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:120) at TesteAutomatizado.main(TesteAutomatizado.java:10)
Caused by: java.lang.ClassNotFoundException: org.apache.http.auth.Credentials
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
++++++++++++++++++++++++++++++++++++++++++++
Tenho o seguinte código:
import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver;
public class TesteAutomatizado {
public static void main(String[] args) {
FirefoxDriver driver = new FirefoxDriver();
//System.setProperty("webdriver.gecko.driver", "C:/kdi");
driver.get("http://www.google.com");
WebElement campoTexto = driver.findElement(By.name("q"));
campoTexto.sendKeys("Wanderson");
campoTexto.submit();
}
}
+++++++++++++++++++++++++++++++++++++++++++++++++++++
O código compila, mas dá erro na execução.
Tenho as seguintes bibliotecas .jar referenciadas e incluídas no projeto que aproveitei de outro projeto:
guava-19.0
selenium-support-2.53.1
selenium-remote-driver-2.53.1
selenium-java-2.53.1
selenium-firefox-driver-2.53.1
selenium-api-2.53.1
Não sei se falta mais algum .jar ou alguma outra configuração no eclipse.