コード例 #1
0
 public ChromeDriverProvider(
     IRemoteDriverFinder remoteLocalDriverFinder,
     ILocalDriverFinder localLocalDriverFinder
     )
 {
     _remoteLocalDriverFinder = remoteLocalDriverFinder;
     _localLocalDriverFinder  = localLocalDriverFinder;
 }
コード例 #2
0
        private void BuildRemoteDriverFinder()
        {
            var chromeDriverSite = new ChromeDriverSite(_httpClientWrapper);

            if (_desiredDriver == DesiredDriver.Latest)
            {
                _remoteDriverFinder = new ChromeLatestDriverFinder(chromeDriverSite, _driverDownloader);
            }
            else if (_desiredDriver == DesiredDriver.LatestCompatible)
            {
                var versionDetector    = new ChromeVersionDetector();
                var releaseNotesParser = new ReleaseNotesParser();
                _remoteDriverFinder = new ChromeCompatibleDriverFinder(
                    versionDetector,
                    releaseNotesParser,
                    chromeDriverSite,
                    _driverDownloader
                    );
            }
            else
            {
                throw new InvalidEnumArgumentException(nameof(_desiredDriver));
            }
        }