-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
32 lines (24 loc) · 1 KB
/
index.js
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
31
32
"use strict";
var path = require("path");
var selenium_server = {
getServerPath: function () {
return path.resolve(__dirname + "/selenium-server-standalone-2.46.0.jar")
},
getChromeDriverPath: function () {
var chromeDriverPath = '';
if (process.platform === 'linux' && process.arch === 'x64') {
chromeDriverPath = path.resolve(__dirname + "/drivers/linux64");
} else if (process.platform === 'linux') {
chromeDriverPath = path.resolve(__dirname + "/drivers/linux32/");
} else if (process.platform === 'darwin') {
chromeDriverPath = path.resolve(__dirname + "/drivers/mac32/");
} else if (process.platform === 'win32') {
console.log('Windows platform is not supported yet');
} else {
console.log('Unexpected platform or architecture:', process.platform, process.arch);
process.exit(1);
}
return chromeDriverPath
}
};
module.exports = selenium_server; //export