HomeSelenium C#

Selenium C# – Installing Selenium

Selenium C# – Installing Selenium

<<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:

C# for Selenium - Package Manager Console Option

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

Selenium C# - Installing Selenium WebDriver

3) Successfully installed message will be displayed as shown below:

Selenium C# - Successfully Installed Selenium WebDriver

4) Now install Selenium Support libraries by executing the below command in Package Manager Console:

Install-Package Selenium.Support -Version 3.141.0

Selenium C# - Installing Selenium Support

5) Successfully installed message will be displayed as shown below:

Selenium C# - Installing Selenium Support

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:

Selenium C# - Manage NuGet Packages for Solution

2) While the Browse option is selected, search for ‘Selenium WebDriver’ and select the ‘Selenium WebDriver’ from the Search Results as shown below:

Selenium C# - Search Selenium WebDriver NuGet Solution

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:

Selenium C# - Second Way Installing Selenium WebDriver

4) Click on ‘OK’ button on the displayed dialog as shown below:

Selenium C# - Installing Selenium WebDriver Confirmation Dialog

5) Successfully installed message will be displayed in the Output as shown below:

Selenium C# - Installing Selenium WebDriver Successfully

6) While the Browse option is selected, search for ‘Selenium WebDriver’ and select the ‘Selenium Support’ from the Search Results as shown below:

Selenium C# - Search Support

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:

Selenium C# - Support Install Button

8) Click on ‘OK’ button on the displayed dialog as shown below:

Selenium C# - Support Confirmation

9) Successfully installed message will be displayed in the Output as shown below:

Selenium C# - Way 2 Success Support Installed

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 ?

About Me > Naveen Repala

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>>

Comments (2)

Leave a Reply

Your email address will not be published. Required fields are marked *

For FREE Testing Tutorials & Videos

X
Open chat
Contact Us on Whatsapp