<<Previous Post << Complete Tutorial>> Next Post>>
Selenium C# – Installing Selenium
Before we start executing any Selenium C# Automation Scripts, we need to first install Selenium in Visual Studio IDE.
There are two ways you can install Selenium for C# in Visual Studio IDE.
First Way: Installing Selenium from Package Manager Console:
Follow the below steps for installing Selenium libraries from Package Manager Console:
1) In the Visual Studio, select ‘Package Manager Console’ option from Tools Menu > NuGet Package Manager as shown below:
2) In the displayed Package Manager console, execute the below command to install Selenium WebDriver libraries:
Note: In the below command, we have given latest Selenium version as per the day we have written the article. While you are going through this article, the latest version may be different. Hence provide the latest version of Selenium in the below command while working.
Install-Package Selenium.WebDriver -Version 3.141.0
3) Successfully installed message will be displayed as shown below:
4) Now install Selenium Support libraries by executing the below command in Package Manager Console:
Install-Package Selenium.Support -Version 3.141.0
5) Successfully installed message will be displayed as shown below:
Here concludes the first way of installing Selenium in Visual Studio.
Let’s also check the other way of installing Selenium in Visual Studio.
Second Way: Installing Selenium from Manage NuGet Packages for Solution:
Follow the below steps for installing Selenium libraries from Manage NuGet Packages for Solution:
1) In the Visual Studio, select ‘Manage NuGet Packages for Solution’ option from Tools Menu > NuGet Package Manager as shown below:
2) While the Browse option is selected, search for ‘Selenium WebDriver’ and select the ‘Selenium WebDriver’ from the Search Results as shown below:
3) Select the Project in which the Selenium needs to be installed, select the Latest Stable Version and click on ‘Install’ Button as shown below:
4) Click on ‘OK’ button on the displayed dialog as shown below:
5) Successfully installed message will be displayed in the Output as shown below:
6) While the Browse option is selected, search for ‘Selenium WebDriver’ and select the ‘Selenium Support’ from the Search Results as shown below:
7) Select the Project in which the Selenium Support needs to be installed, select the Latest Stable Version and click on ‘Install’ Button as shown below:
8) Click on ‘OK’ button on the displayed dialog as shown below:
9) Successfully installed message will be displayed in the Output as shown below:
Here concludes the second way of installing Selenium in Visual Studio.
I will explain the execution of Selenium C# Automation Test scripts in Visual Studio in the upcoming articles.
Next Steps:
- > To learn more about Selenium C#, continue to the next post (Click on Next Post Link Below)
- > Check complete Selenium C# Tutorial Contents here (Click here)
Please leave your questions/comments/feedback below.
Happy Learning ?
Connect to me on Linked In (Click here)
On a mission to contribute to the Software Testing Community in all possible ways.
<<Previous Post << Complete Tutorial>> Next Post>>
Hi Praneeth,
I want to learn selenium C #.
I am waiting for your next post on selenium C#.
Thank you
Sure, I will post more articles on Selenium C# soon.
Keep following.