Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit c895d55

Browse files
Merge pull request #38 from jac1013/fix-for-download-of-latest-version-of-selenium
fix: The XML source from where we were getting the version changed
2 parents d531233 + 2716011 commit c895d55

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ node_js:
33
- '0.10'
44
- '4'
55
- '6'
6+
addons:
7+
apt:
8+
packages:
9+
- oracle-java8-set-default
610
before_install:
711
- npm install -g npm@latest-2
812
before_deploy:

lib/selenium/version.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,11 @@ function buildDownloadUrl(version, minorVersion) {
4040
}
4141

4242
var FALLBACK_SELENIUM_VERSION = '2.53.0';
43-
var FORCE_SELENIUM_VERSION = {
44-
downloadUrl: buildDownloadUrl('2.53.0', '2.53'),
45-
version: '2.53.0'
46-
};
4743

4844
function parseSeleniumMinor(result) {
4945
try {
5046
var prefixes = result.ListBucketResult.CommonPrefixes;
51-
var prefix = prefixes[prefixes.length - 2];
47+
var prefix = prefixes[prefixes.length - 3];
5248
var versionPath = prefix.Prefix[0];
5349
return {
5450
error: null,
@@ -123,9 +119,6 @@ function getLatestVersion(callback) {
123119
}
124120

125121
function getLatestDownloadInfo(callback) {
126-
if (FORCE_SELENIUM_VERSION != null) {
127-
return callback(null, FORCE_SELENIUM_VERSION);
128-
}
129122
return getLatestVersion(function onVersion(error, version) {
130123
if (error != null) {
131124
version = FALLBACK_SELENIUM_VERSION;

0 commit comments

Comments
 (0)