minigame
This commit is contained in:
21
node_modules/geckodriver/lib/geckodriver.js
generated
vendored
Normal file
21
node_modules/geckodriver/lib/geckodriver.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
var path = require('path');
|
||||
|
||||
// add the geckodriver path to process PATH
|
||||
process.env.PATH += path.delimiter + path.join(__dirname, '..');
|
||||
|
||||
// support win32 vs other platforms
|
||||
exports.path = process.platform === 'win32' ? path.join(__dirname, '..', 'geckodriver.exe') : path.join(__dirname, '..', 'geckodriver');
|
||||
|
||||
// specify the version of geckodriver
|
||||
exports.version = process.env.GECKODRIVER_VERSION || '0.32.0';
|
||||
|
||||
exports.start = function(args) {
|
||||
exports.defaultInstance = require('child_process').execFile(exports.path, args);
|
||||
return exports.defaultInstance;
|
||||
}
|
||||
|
||||
exports.stop = function () {
|
||||
if (exports.defaultInstance !== null){
|
||||
exports.defaultInstance.kill();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user