0

I am new to automation with selenium and trying to run a basic program to launch Firefox and open Google.com. But I get Firefox launched with "about:blank&utm_content=firstrun" Please help. Am on Windows 10 and Firefox version is: 48.0 (latest). I have the latest Selenium drivers and JRE versions too.

Here is my code:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class GoogleTest {

    public static void main(String[] args) {
        WebDriver driver = new FirefoxDriver();
        driver.get("http://google.com");
    }
}
Koopakiller
  • 2,838
  • 3
  • 32
  • 47
  • Follow this http://stackoverflow.com/questions/38676719/fail-to-launch-mozilla-with-selenium/38676858#38676858 – Saurabh Gaur Aug 18 '16 at 00:48
  • If you are using latest versions, then you have to user geckodriver to launch firefox browser. Check this Selenium 3 Example https://www.seleniumeasy.com/selenium-tutorials/launching-firefox-browser-with-geckodriver-selenium-3 – Dev Raj Aug 18 '16 at 10:42
  • I tried the solution provided and changed my code as below, but still am getting the same issue: import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class GoogleTest { public static void main(String[] args) { System.setProperty("webdriver.gecko.driver","C:/Users/gangamai/Downloads/geckodriver-v0.10.0-win64/geckodriver.exe"); WebDriver driver = new FirefoxDriver(); driver.navigate().to("http://google.com"); } } – learner4Ever Aug 19 '16 at 06:49

0 Answers0