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

preview_player
Показать описание
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.

*Links*
Visual Studio Code:

.NET Core SDK

Visual 2015 C++ Redistributable Package:

Geckodriver:

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
IWebDriver driver = new FirefoxDriver(@"C:\Users\ergo\Documents\WebDriver", options);

driver.FindElement(By.Name("q")).SendKeys("Selenium Wikipedia"+ Keys.Return);
Thread.Sleep(2000);
driver.Quit();
}
}
}

#csharp #coding #selenium #VisualStudioCode #SourceCode
Рекомендации по теме