Selenium C # Test Project Doesn't Work Chrome

I am asking for a selenium test when working with chrome, but have encountered Exception. help me. my code is:

using System;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using OpenQA.Selenium.Support.UI;
using System.Text;
using System.Threading;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome; 

namespace Acceptance_Test.Trader
{
    [TestFixture]
    public class AcceptenceTestBtcTraderCom
    {
        private IWebDriver _driver;
        private StringBuilder _verificationErrors;
        private string _baseUrl;


        [SetUp]
        public void SetupTest()
        {
            _driver = new ChromeDriver(); // ** exception location is this one.

An exception of type 'OpenQA.Selenium.DriverServiceNotFoundException' occurred in WebDriver.dll, but was not processed in the user code. information: The chromedriver.exe file does not exist in the current directory or in the PATH environment variable directory. The driver can be downloaded at chromedriver.storage.googleapis.com/index.html

+4
source share
1 answer

You need to add the path to the chrome driver:

_driver = new ChromeDriver("C:\\Folder_with_Chrome_driver");

If you have not downloaded the driver, you can find it here .

+15
source

All Articles