How to install Visual Studio Code with Selenium C# (C Sharp) on Win10 x64

Опубликовано: 22 Март 2026
на канале: Frank Enstein
2,222
10

Installation process of Visual Studio Code, Selenium C#, Firefox WebDriver on Windows 10 x64

Selenium is a framework for automated software testing of web applications.

The below C# test script automatically launches a Firefox browser instance and open http://www.google.com and enter “Selenium Wikipedia” in the search field.

Links
Visual Studio Code:
https://code.visualstudio.com/download

.NET Core SDK
https://dotnet.microsoft.com/download...

Visual 2015 C++ Redistributable Package:
https://www.microsoft.com/en-us/downl...

Geckodriver:
https://github.com/mozilla/geckodrive...

C# Script:

using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;

using System;
using System.Threading;

namespace selenium
{
class Program
{
static void Main(string[] args)
{

FirefoxBinary binary = new FirefoxBinary();
FirefoxOptions options = new FirefoxOptions();

//optional
options.BrowserExecutableLocation = @"C:\Program Files\Mozilla Firefox\firefox.exe";
IWebDriver driver = new FirefoxDriver(@"C:\Users\ergo\Documents\WebDriver", options);

driver.Navigate().GoToUrl("http://www.google.com");
driver.FindElement(By.Name("q")).SendKeys("Selenium Wikipedia"+ Keys.Return);
Thread.Sleep(2000);
driver.Quit();
}
}
}

#csharp #coding #selenium #VisualStudioCode #SourceCode