I have written the below code in java to just open the firefox and redirect to gmail.com link, but seems its getting timed out before redirection. I have checked for the sol
As you are working with Selenium v3.12.0, GeckoDriver is v0.20.1 and Firefox v60.0.2 you have to mandatorily use marionette which is the default configuration. As you have forcefully set marionette
to false so you see the error as:
org.openqa.selenium.WebDriverException: Timed out waiting 45 seconds for Firefox to start.
There are 2 ways to address your issue as follows:
Either use the default configuration (marionette set as true) as follows:
System.setProperty("webdriver.gecko.driver", "C:\Users\MI SERVICE\Downloads\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.navigate().to("https://www.gmail.com");
driver.quit();
Or you can explicitly set marionette to true as follows:
System.setProperty("webdriver.gecko.driver", "C:\Users\MI SERVICE\Downloads\geckodriver.exe");
FirefoxOptions capa = new FirefoxOptions();
capa.setCapability("marionette", true);
WebDriver driver = new FirefoxDriver(capa);
driver.navigate().to("https://www.gmail.com");
driver.quit();