Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
feat(webdriver-manager): add --ie32 commandline option
Browse files Browse the repository at this point in the history
The new option allows to download the 32-bit version of the IE driver on
a 64-bit system, as the 64-bit version has been broken for over a year
now (the sendKeys() function works very slowly on it).
  • Loading branch information
Rogier Schouten authored and hankduan committed Sep 1, 2015
1 parent 1767494 commit c989a7e
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion bin/webdriver-manager
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ var binaries = {
}
}
}
},
ie32: {
name: 'IEDriver-32bit',
isDefault: false,
prefix: 'IEDriverServer',
filename: 'IEDriverServer_' + versions.iedriver + '.zip',
cdn: 'https://selenium-release.storage.googleapis.com/',
url: function() {
var urlPrefix = this.cdn +
shortVersion(versions.iedriver) + '/IEDriverServer';
if (os.type() == 'Windows_NT') {
return urlPrefix + '_Win32_' + versions.iedriver + '.zip';
}
}
}
};

Expand Down Expand Up @@ -262,7 +276,7 @@ switch (argv._[0]) {
args.push('-Dwebdriver.chrome.driver=' +
path.join(argv.out_dir, executableName('chromedriver')));
}
if (binaries.ie.exists) {
if (binaries.ie.exists || binaries.ie32.exists) {
args.push('-Dwebdriver.ie.driver=' +
path.join(argv.out_dir, executableName('IEDriverServer')));
}
Expand Down Expand Up @@ -320,6 +334,15 @@ switch (argv._[0]) {
zip.extractAllTo(argv.out_dir, true);
});
}
if (argv.ie32) {
downloadIfNew(binaries.ie32, argv.out_dir, existingFiles,
function(filename) {
var zip = new AdmZip(filename);
// Expected contents of the zip:
// IEDriverServer.exe
zip.extractAllTo(argv.out_dir, true);
});
}
break;
default:
console.error('Invalid command');
Expand Down

0 comments on commit c989a7e

Please sign in to comment.