OpenQA.Selenium.DriverService.FindDriverServiceExecutable C# (CSharp) Method

FindDriverServiceExecutable() protected static method

Finds the specified driver service executable.
/// If the specified driver service executable does not exist in the current directory or in a directory on the system path. ///
protected static FindDriverServiceExecutable ( string executableName, Uri downloadUrl ) : string
executableName string The file name of the executable to find.
downloadUrl System.Uri A URL at which the driver service executable may be downloaded.
return string
        protected static string FindDriverServiceExecutable(string executableName, Uri downloadUrl)
        {
            string serviceDirectory = FileUtilities.FindFile(executableName);
            if (string.IsNullOrEmpty(serviceDirectory))
            {
                throw new DriverServiceNotFoundException(string.Format(CultureInfo.InvariantCulture, "The {0} file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at {1}.", executableName, downloadUrl));
            }

            return serviceDirectory;
        }