Skip to content

Commit 7ee2b20

Browse files
committed
Log Firefox and Chrome version after downloading them
1 parent b99c45b commit 7ee2b20

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/testSelenium.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,6 @@ suite('selenium', function() {
122122

123123
promises.push(seleniumInit.downloadFirefoxNightly());
124124

125-
try {
126-
console.log('Using Firefox: ' + firefoxStableBinaryPath);
127-
console.log('Version: ' + childProcess.execSync(firefoxStableBinaryPath + ' --version'));
128-
console.log('Beta Version: ' + childProcess.execSync(firefoxBetaBinaryPath + ' --version'));
129-
} catch (e) {}
130-
131125
if (process.env.GCM_API_KEY) {
132126
chromeBinaryPath = process.env.CHROME;
133127
if (chromeBinaryPath === 'nightly') {
@@ -144,11 +138,6 @@ suite('selenium', function() {
144138
}
145139

146140
promises.push(seleniumInit.downloadChromeDriver());
147-
148-
try {
149-
console.log('Using Chromium: ' + chromeBinaryPath);
150-
console.log('Version: ' + childProcess.execSync(chromeBinaryPath + ' --version'));
151-
} catch (e) {}
152141
}
153142

154143
return Promise.all(promises)
@@ -161,9 +150,20 @@ suite('selenium', function() {
161150
throw new Error('Firefox binary doesn\'t exist at ' + firefoxBetaBinaryPath + '.'.bold.red);
162151
}
163152

153+
try {
154+
console.log('Using Firefox: ' + firefoxStableBinaryPath);
155+
console.log('Version: ' + childProcess.execSync(firefoxStableBinaryPath + ' --version'));
156+
console.log('Beta Version: ' + childProcess.execSync(firefoxBetaBinaryPath + ' --version'));
157+
} catch (e) {}
158+
164159
if (process.env.GCM_API_KEY && !fs.existsSync(chromeBinaryPath)) {
165160
throw new Error('Chrome binary doesn\'t exist at ' + chromeBinaryPath + '. Use your installed Chrome binary by setting the CHROME environment'.bold.red);
166161
}
162+
163+
try {
164+
console.log('Using Chromium: ' + chromeBinaryPath);
165+
console.log('Version: ' + childProcess.execSync(chromeBinaryPath + ' --version'));
166+
} catch (e) {}
167167
});
168168
});
169169

0 commit comments

Comments
 (0)