As well as adding a reference to the project for Selenium WebDriver and NUnit, you must also add a “using” statement for the sections you are going to use in your test. A good start is to add the following using statements to your file:
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using NUnit.Framework;

Note: If you have more than one CS file in your project, you will need a using statement(s) for each file as required.

This may seem as common sense to the more seasoned programmer but for those starting off at the beginning it is a useful reminder. In the example above I have added a using statement for the standard Selenium WebDriver and NUnit classes and also for the Firefox browser. There are many other possibilities, but I will cover those as we need them.

This screenshot shows where the using statements are usually placed in a C# file:
Using Statements

Well a lot of angles covered anyway. As I have a Mac at home and a Win8 PC in work I will be posting examples and tips from both setups. Hopefully it will be a fairly balanced approach. In work I’ll be using WebDriver with the C# programming language, Visual Studio 2013 and NUnit. From my Home setup I will be using Java programming language and the JUnit test framework to write the WebDriver tests, but I am so far undecided on the IDE and build process. For IDE’s Eclipse and NetBeans are free and Intellij is a paid-for application. And the build process can use Maven or Ant. From what I have read online it appears that Maven is the easier one to use to get up and running so I will start with that.

So far I have found the beginning process a lot easier with the C# Visual Studio NUnit approach than with the Java based approach. I think the biggest help for this was my access to Pluralsight training videos, which luckily for me, the trainers all used C#, Visual Studio and NUNit for their test examples in the training courses. I have yet to find a similar resource from the world of Java/JUnit/etc which is part of the reason for writing this blog.