chromedriver 123.0.2 → 123.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/install.js +7 -6
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -52,7 +52,7 @@ class Installer {
52
52
  const majorVersion = parseInt(chromedriverVersion.split('.')[0]);
53
53
  const useLegacyMethod = majorVersion <= 114;
54
54
  const platform = this.getPlatform(chromedriverVersion);
55
- const downloadedFile = this.getDownloadFilePath(useLegacyMethod, tmpPath, platform);
55
+ let downloadedFile = this.getDownloadFilePath(useLegacyMethod, tmpPath, platform);
56
56
  if (!useLegacyMethod)
57
57
  tmpPath = path.join(tmpPath, path.basename(downloadedFile, path.extname(downloadedFile)));
58
58
  const chromedriverBinaryFileName = process.platform === 'win32' ? 'chromedriver.exe' : 'chromedriver';
@@ -63,12 +63,13 @@ class Installer {
63
63
  const configuredfilePath = process.env.npm_config_chromedriver_filepath || process.env.CHROMEDRIVER_FILEPATH;
64
64
  if (configuredfilePath) {
65
65
  console.log('Using file: ', configuredfilePath);
66
- return configuredfilePath;
66
+ downloadedFile = configuredfilePath;
67
+ } else {
68
+ if (useLegacyMethod)
69
+ await this.downloadFileLegacy(legacyCdnUrl, downloadedFile, chromedriverVersion);
70
+ else
71
+ await this.downloadFile(cdnUrl, downloadedFile, chromedriverVersion, platform);
67
72
  }
68
- if (useLegacyMethod)
69
- await this.downloadFileLegacy(legacyCdnUrl, downloadedFile, chromedriverVersion);
70
- else
71
- await this.downloadFile(cdnUrl, downloadedFile, chromedriverVersion, platform);
72
73
  await this.extractDownload(extractDirectory, chromedriverBinaryFilePath, downloadedFile);
73
74
  }
74
75
  const libPath = path.join(__dirname, 'lib', 'chromedriver');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chromedriver",
3
- "version": "123.0.2",
3
+ "version": "123.0.3",
4
4
  "keywords": [
5
5
  "chromedriver",
6
6
  "selenium"