forked from aspnet/JavaScriptServices
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-selenium.js
More file actions
30 lines (24 loc) · 809 Bytes
/
start-selenium.js
File metadata and controls
30 lines (24 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
var seleniumStandalone = require('selenium-standalone');
var installOptions = {
progressCb: function(totalLength, progressLength, chunkLength) {
var percent = 100 * progressLength / totalLength;
console.log('Installing selenium-standalone: ' + percent.toFixed(0) + '%');
}
};
console.log('Installing selenium-standalone...');
seleniumStandalone.install(installOptions, function(err) {
if (err) {
throw err;
}
var startOptions = {
javaArgs: ['-Djna.nosys=true'],
spawnOptions: { stdio: 'inherit' }
};
console.log('Starting selenium-standalone...');
seleniumStandalone.start(startOptions, function(err, seleniumProcess) {
if (err) {
throw err;
}
console.log('Started Selenium server');
});
});