vendredi 23 octobre 2020

Selenium C# - ChromeDriverService.CreateDefaultService() System.ComponentModel.Win32Exception: 'The directory name is invalid'

I am getting this error when try to run chrome with a different user. I cant seem to figure out why i am getting the error

the assembly directory and chromedriver.exe seems to be correct but chrome browser wont launch for some reason

Selenium.Webdriver.ChromeDriver = 81.0.4044.13800

Chrome v = Version 81.0.4044.138 (Official Build) (64-bit)

 private static RemoteWebDriver OpenChromeBrowser(string userName)
        {
            Console.WriteLine("Entering Chromesetup");
            var driverPath = CommonHelper.AssemblyDirectory;
       

            Console.WriteLine($"Assembly Directory : {driverPath}");
               var service = ChromeDriverService.CreateDefaultService(driverPath); //Error seems to happen here

enter image description here

enter image description here

Aucun commentaire:

Enregistrer un commentaire