Alguém poderia me ajudar ?? Tentei usar o ChromeDriver no lugar do driver do Firefox.
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) {
// abre firefox
WebDriver driver = new ChromeDriver();
// acessa o site do google
driver.get("http://www.google.com.br/");
// digita no campo "q" do google
WebElement query = driver.findElement(By.name("q"));
query.sendKeys("Caelum");
// submete o form
query.submit();
}
}
E retornou o seguinte erro:
Exception in thread "main" java.lang.Error: Unresolved compilation problems: WebDriver cannot be resolved to a type ChromeDriver cannot be resolved to a type WebElement cannot be resolved to a type By cannot be resolved
at TesteAutomatizado.main(TesteAutomatizado.java:10)