Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Function at teste.TesteAutomatizado.main(TesteAutomatizado.java:11) Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function 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) ... 1 more
o codigo é :
package teste;
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:/geckodriver.exe"); WebDriver driver = new FirefoxDriver(); driver.get("http://www.google.com.br"); WebElement campoBusca = driver.findElement(By.name("q")); campoBusca.sendKeys("Caelum"); campoBusca.submit(); }
}