-1

I am getting error message for it failure while running below script:

public class Sample1 {
    public static void main(String[] args) {
        WebDriver driver= new FirefoxDriver();
        driver.get("http://www.cleartrip.com/");
        driver.manage().window().maximize();
    }
}
basgys
  • 4,320
  • 28
  • 39
  • 1
    What is the error mesage you get when you run this? Without this we cannot help you – RemcoW Jun 17 '16 at 11:26
  • 1
    Possible duplicate of [Can't open browser with selenium after firefox update](http://stackoverflow.com/questions/37761668/cant-open-browser-with-selenium-after-firefox-update) – Mobrockers Jun 17 '16 at 12:14

1 Answers1

0

Your Firefox browser might not been installed on default location. Try using below code.

public class Sample1 {
public static void main(String[] args) {

System.setProperty("webdriver.firefox.driver", "location of your firefox exe");    
WebDriver driver= new FirefoxDriver();
    driver.get("http://www.cleartrip.com/");
    driver.manage().window().maximize();
}

}

Thanks,

Rakesh Raut

Rakesh Raut
  • 183
  • 3
  • 12