Example #1
0
 private static async Task DownloadDriver(string targetDirectory, RemoteChromeDriverInfo remoteWebDriver)
 {
     using (var downloadedDriver = await remoteWebDriver.Download())
         using (var localDriverFile = CreateFile(targetDirectory))
         {
             await downloadedDriver.CopyToAsync(localDriverFile);
         }
 }
Example #2
0
        public async Task <RemoteChromeDriverInfo> FindDriverInfo()
        {
            var driverUrl = await _chromeDriverSite.GetLatestDriverZipUrl();

            var result = new RemoteChromeDriverInfo(driverUrl, _downloader);

            return(result);
        }
Example #3
0
        public async Task <RemoteChromeDriverInfo> FindDriverInfo()
        {
            var latestReleaseNotes = await _chromeDriverSite.GetLatestReleaseNotes();

            var browserVersion    = _browserVersionDetector.Detect();
            var compatibleVersion = _releaseNotesParser.FindCompatibleDriverVersion(latestReleaseNotes, browserVersion);
            var driverUrl         = _chromeDriverSite.GetDriverZipUrl(compatibleVersion);
            var result            = new RemoteChromeDriverInfo(driverUrl, _driverDownloader);

            return(result);
        }