1

This question regards best practice. I am building an automated testing framework using Selenium WebDriver and Visual Studio with C#. I am using TFS to check my project in to however I am running in to problems with checking in the browser drivers.

Browser drivers usually reside in the bin folder of a project however TFS excludes the bin folder by default as it contains files that are manually created for the project on each persons computer who checks it out. My question is, short of checking the bin folder in for my project, what is the best practice to ensure that when users check my project out of TFS they are receiving both the project source and the browser drivers required to make the selenium tests run?

Thanks in advance!

EDIT

I thought I might add a little more regarding my current issue. I am developing a software testing framework utilizing Selenium WebDriver. I am utilizing C# and as such am using Visual Studio. My solution structure is as follows: I have two projects in my solution, a class library consisting of my testing framework (which includes Selenium WebDriver and the WebDriver support Nuget packages) and a unit test project. My unit test project references my testing framework project so that the classes I write in it can be utilized in the unit tests.

All of my Selenium code is handled in the framework project so that there is a level of abstraction between the tests that are written and the selenium code.

So far I have found that despite the fact that Selenium code is handled in the framework project the browser drivers need to be stored in the unit test project for the tests to work properly (As was determined in this Q&A Question )

1
  • For the time being I have simply created a folder in my root C for selenium drivers and added it to the PATH for my system. Obviously this is the opposite of what I want to do as I need the drivers to be bundled with the project so that when users sync it down they are ready to go. Oct 26, 2016 at 23:52

1 Answer 1

0

Try creating a folder named "WebDrivers" at the root folder of your project. Update your driver path at the code by relative path. (eg: "./WebDrivers") Then check in that folder.

It should check in the newly created folder.

3
  • When I try doing this I receive an "OpenQA.Selenium.DriverServiceNotFoundException". I'm adding more background to my particular situation in the initial post. Oct 27, 2016 at 12:18
  • Try using nuget manager
    – ChathuD
    Oct 28, 2016 at 1:27
  • Thank you very much for the answer and follow up suggestion. I think I will have to use NuGet. I was trying to avoid doing so but it appears to be my only option. Oct 28, 2016 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.