0

I am currently facing a problem in initializing Firefox in selenium. This issue seems to be only happening to me on Windows Server 2012 r2 as I have tried the same configuration on my local machine (windows 10) and it worked without a problem.

I am currently using this code (C#):

 FirefoxDriverService service = FirefoxDriverService.CreateDefaultService("Path to Drivers folder", "geckodriver.exe");
                    service.Port = 6444;
                    service.FirefoxBinaryPath = "Firefox installation path";
                    ffDriver = new FirefoxDriver(service);

However, it is returning this error:

OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://localhost:6444/session timed out after 60 seconds. ---> System.Net.WebException: The operation has timed out

Current versions being used:

  • Firefox 56.0 64bit
  • Selenium 3.5.1
  • Geckodriver v0.19.0 64bit

Can someone please guide me through this issue?

iamsankalp89
  • 4,607
  • 2
  • 15
  • 36
user1343543
  • 31
  • 1
  • 7

1 Answers1

0

Add this in code on Launching FirefoxDriver

By referencing this answer

  ffDriver=   new FirefoxDriver(new FirefoxBinary(),new FirefoxProfile(),TimeSpan.FromSeconds(120));
iamsankalp89
  • 4,607
  • 2
  • 15
  • 36