public DriverService GetDriverService() { if (_driverService != null) { return(_driverService); } _driverService = _driverConfig switch { ChromeConfig _ => ChromeDriverService.CreateDefaultService(_driverConfig.DriverDirectoryFullPath()), _ => throw new InvalidOperationException() }; _driverService.Port = NextFreeTcpPort(); return(_driverService); }
public static string DriverFileFullPath(this IDriverConfig driverConfig) { return(Path.Combine(driverConfig.DriverDirectoryFullPath(), driverConfig.GetBinaryName())); }