WebDriver is a tool for automatingtesting web applications, and, in particular, to verify that they work as expected. It aims to provide a friendly API that’s easy to explore and understand, which will help make your tests easier to read and maintain. It’s not tied to any particular test framework so that it can be used equally well with MSTest, NUnit, TestNG, JUnit and so on. This “Getting Started” guide introduces you to WebDriver’s C# API and helps get you started becoming familiar with it.
Create Your First WebDriver Test Project
1. Create New Test Project in Visual Studio.
2. Install NuGet package manager and navigate to it.
3. Search for Selenium and install the first item in the result list
Code Examples In WebDriver
Create an instance of a driver.
IWebDriver driverOne = new FirefoxDriver();
IWebDriver driverTwo = new InternetExlorerDriver(“C:PathToMyIeDriverBinaries“);