What is the best practice for using Firefox's geckodriver in a Selenium Automation Framework?


April 2019


3 time


I've started trying out Selenium with Firefox and I've gotten it to work by downloading the gecko driver and referencing the file path in my code (I'm using C#):

FirefoxDriverService service = 

IWebDriver driver = new FirefoxDriver(service);


But I'm thinking about the bigger picture. What happens when it comes to my CI pipeline? Is it better to embed the driver file into my Visual Studio solution and reference it from there (is this even possible?) Or should I just make sure the driver is installed on the box that will be running the integration tests? Ideally I don't want to have the file path hard coded in my code.

What are people's thoughts? Does anyone else have any experience of working around this?

0 answers