How to setup Selenium Webdriver with C# in Visual Studio environment

in technology •  7 years ago  (edited)

Hi all,
in this post i will show how to setup C# binds of Selenium Webdriver with Visual Studio. You can follow steps:

  1. Create a C# project in Visual Studio
  2. Install Selenium Webdriver from Nuget package manager. Tools -> NuGet Package Managers -> Manage NuGet Packages for Solution

NuGet-package-manager.png

  1. Click on Browse tab.
  2. Write "Selenium webdriver" into search textfield
  3. Click on result for Selenium.WebDriver binds
  4. Select whatever project you would to use on the right side of list section
  5. Select appropriate version and click on Install button

Install-Selenium-Webdriver.png

  1. Wait for installation completion
  2. Add an empty c# file (.cs)
  3. Enter your code
  4. Click on “Run” button on menu bar

After a short while a Chrome browser will be appear, execute commands and then closed.
P.S: You should download Chrome driver or driver of whatever browser you want to use in your script(firefox, ie, safari…)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!