Estou usando a versão 2.53 do standalone server e a versão 49 do firefox, e tive o erro abaixo no terminal do Eclipse.
package packagetesting;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class TesteAutomatizado {
public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver", "C:\\Users\\rafaela.castro\\Downloads\\geckodriver-v0.26.0-win64\\geckodriver.exe");
// abre firefox
WebDriver driver = new FirefoxDriver();
// acessa o site do google
driver.get("http://www.google.com/");
// digita no campo com nome "q" do google
WebElement campoDeTexto = driver.findElement(By.name("q"));
campoDeTexto.sendKeys("Caelum");
// submete o form
campoDeTexto.submit();
}
}
Exception in thread "main" java.lang.NoClassDefFoundError: java/sql/Time
at selenium.server.standalone@2.53.0/com.google.gson.Gson.<init>(Gson.java:232)
at selenium.server.standalone@2.53.0/com.google.gson.GsonBuilder.create(GsonBuilder.java:545)
at selenium.server.standalone@2.53.0/org.openqa.selenium.remote.BeanToJsonConverter.convert(BeanToJsonConverter.java:67)
at selenium.server.standalone@2.53.0/org.openqa.selenium.remote.http.JsonHttpCommandCodec.encode(JsonHttpCommandCodec.java:228)
at selenium.server.standalone@2.53.0/org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:139)
at selenium.server.standalone@2.53.0/org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.execute(NewProfileExtensionConnection.java:160)
at selenium.server.standalone@2.53.0/org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.execute(FirefoxDriver.java:380)
at selenium.server.standalone@2.53.0/org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)
at selenium.server.standalone@2.53.0/org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
at selenium.server.standalone@2.53.0/org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at selenium.server.standalone@2.53.0/org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:218)
at selenium.server.standalone@2.53.0/org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
at selenium.server.standalone@2.53.0/org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:207)
at selenium.server.standalone@2.53.0/org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
at iDETesting/packagetesting.TesteAutomatizado.main(TesteAutomatizado.java:13)
Caused by: java.lang.ClassNotFoundException: java.sql.Time
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 15 more