I am Trying to lunch Firefox and do a simple search on Google but i am only able to launch the Firefox. what should be edit in the code to run it smooth?I am Using Firefox Quantum 57 which runs using maven dependencies.
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class FirefoxLaunch
{
@Test
public static void main(String [] args) {
WebDriver driver;
driver = new FirefoxDriver();
driver.get("https://google.com");
WebElement element =driver.findElement(By.name("q"));
element.sendKeys("FirefoxDriver Search Function");
driver.quit();
}
}