How do I use Selenium in C#?

Viewed 59249

Selenium.

I downloaded the C# client drivers and the IDE. I managed to record some tests and successfully ran them from the IDE. But now I want to do that using C#. I added all relevant DLL files (Firefox) to the project, but I don't have the Selenium class. Some Hello, World! would be nice.

9 Answers
  1. You will need to install Microsoft Visual Studio community Edition
  2. Create a new project as Test Project of C#
  3. Add Selenium references from the NuGet Package Manager. Then you will be all set.
  4. Create a new class and use [Test Class] and [Test Method] annotations to run your script
  5. You can refer to Run Selenium C# | Setup Selenium and C# | Configure Selenium C# for more details.
Related