I use Microsoft Visual Studio 2013 to create my C# WebDriver tests. If you do not have this application then you can download Visual Studio Express from here. I think the most suitable option for our use is the “Express 2013 for Windows Desktop” version.

Select File > New > Project from the menu and you should see a dialog similar to this one:
Create New Project

Select Visual C# from the Installed Templates on the left and then select Class Library from the list in the center. Choose a name for your project and select a location to save it at the bottom of the dialog.

The next step is to add references to your project for Selenium WebDriver and NUnit. You could add these references by directly adding the dll’s but I will accomplish this by using the NuGet Packages which is much easier. The first step is to open the NuGet Packages dialog. In the Solution Explorer, right click on References and select “Manage NuGet Packages…”
Manage NuGet Packages

The next step is to add the references for Selenium WebDriver. To find the Selenium packages, search for “selenium” in the search box in the top right hand side of the dialog:
Add WebDriver References

Followed by a reference for NUnit (again, search for “nunit”):
Add Reference for NUnit

Once these references have been added, they should be displayed in the References section in the Solution Explorer like this:
Refernces have been added

At this stage we are now ready to start writting our C# code for our test.

Deciding to write tests with WebDriver is only half the battle, you still need to pick a programming language, and possibly a test framework also. Most of the examples that I will be posting will be using C# and NUnit, but for the most part it should still be readable and easy to transfer to your chosen flavour. Many people use the Java programming language and JUnit or TestNG as the test framework.

But the choice is up to you, pick a flavour that you are comfortable with and run with it!

The reason I am starting this blog is to provide information for people who are new to WebDriver. When I started writing tests with WebDriver I found it very difficult to find information for beginners. Just the basics to begin with, how to get a test up and running before adding any of the fancy stuff.

There are plenty of resources out there who advanced practitioners who know what they are doing, but I found very little for those who are starting off at the beginning.

Hopefully this site will rectify that situation and I also hope that you find it a useful resource.