Ao utilizar o código:
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) {
System.setProperty("webdriver.chrome.driver","C:\\dev\\ProjetosJava\\testes-de-sistema\\lib\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("https://www.google.com.br/");
WebElement q = driver.findElement(By.name("q"));
q.sendKeys("Caelum");
q.submit();
}
}
Está sendo exibido o seguinte erro:
Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\dev\ProjetosJava\testes-de-sistema\dev\ProjetosJava\testes-de-sistema\lib\chromedriver.exe
at com.google.common.base.Preconditions.checkState(Preconditions.java:585)
at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:146)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:141)
at org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:35)
at org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:159)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:355)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:94)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)
at TesteAutomatizado.main(TesteAutomatizado.java:10)