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