olá amigos
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
public class TesteAutomatizado {
public static void main(String[] args) {
WebDriver driver = new ChromeDriver();
driver.get("http://www.google.com.br");
driver.findElement(By.name("q"));
WebElement campoDeTexto = driver.findElement(By.name("q"));
campoDeTexto.submit();
}
}
ao executar o codigo identico ao do video me deparo com o seguinte erro
Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases at com.google.common.base.Preconditions.checkState(Preconditions.java:738) at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:111) at org.openqa.selenium.firefox.GeckoDriverService.access$100(GeckoDriverService.java:38) at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:112) at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:302) at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:233) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:125) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:121) at TesteAutomatizado.main(TesteAutomatizado.java:12)