0

When I am trying to load the Selenium FireFoxDriver, process is taking more time to invoke the browser. I have tried for lot of options like disabling the auto updates and etc. But all efforts are in vain. So I have decided to load the FirefoxDriver on startup of the Server (i.e, with load-on-startup time as 0 in web.xml when container initializes). Are there any cons with this approach? Also please suggest if there is any better way to do this.

Thanks in advance!!!

1 Answers1

0

In general, WebDriver supports Firfox and Safari browsers by default. There is no need to perform any configuration for this. Please find below for the sample code which initializes the browser

WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com/");

The above code will start the firefox browser installed in your machine and launches the google page. If there is a mismatch between the selenium version of firefox version the browser will be started, but would not launch the google application.

Hope this helps.

k.s. Karthik
  • 731
  • 6
  • 16
  • Thanks for the reply!!! I am using the Selenium 2.53 and Firefox version is 38.8.0. I have had the same piece of code in my project my worry is on the time taken for the web driver to open the Browser. It is taking too much time to open the browser. (almost a minute) – Kishore Josyula May 09 '16 at 15:38
  • Is the browser getting opened and launching the application even after sometime? – k.s. Karthik May 10 '16 at 05:44