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 )

  • 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. – Isaiah Moran Oct 26 '16 at 23:52
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.

  • When I try doing this I receive an "OpenQA.Selenium.DriverServiceNotFoundException". I'm adding more background to my particular situation in the initial post. – Isaiah Moran Oct 27 '16 at 12:18
  • Try using nuget manager – ChathuD Oct 28 '16 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. – Isaiah Moran Oct 28 '16 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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