+15
-7
lines changedFilter options
+15
-7
lines changed Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
1
1
<?xml version="1.0" encoding="UTF-8"?>
2
2
<module type="WEB_MODULE" version="4">
3
+
<component name="ModuleRunConfigurationManager">
4
+
<shared />
5
+
</component>
3
6
<component name="NewModuleRootManager" inherit-compiler-output="true">
4
7
<exclude-output />
5
8
<content url="file://$MODULE_DIR$" />
Original file line number Diff line number Diff line change
@@ -30,8 +30,7 @@ const fs = require('fs')
30
30
*/
31
31
function getPath(service, capabilities) {
32
32
try {
33
-
return pathExists(service.getExecutable()) ||
34
-
driverLocation(capabilities.getBrowserName())
33
+
return pathExists(service.getExecutable()) || driverLocation(capabilities)
35
34
} catch (e) {
36
35
throw Error(
37
36
`Unable to obtain browser driver.
Original file line number Diff line number Diff line change
@@ -58,18 +58,24 @@ function getBinary() {
58
58
59
59
/**
60
60
* Determines the path of the correct driver
61
-
* @param {Browser|string} browser name to fetch the driver
61
+
* @param {Capabilities} options browser options to fetch the driver
62
62
* @returns {string} path of the driver location
63
63
*/
64
64
65
-
function driverLocation(browser) {
66
-
if (!Browser.includes(browser.toLocaleString())) {
65
+
function driverLocation(options) {
66
+
if (!Browser.includes(options.getBrowserName().toLocaleString())) {
67
67
throw new Error(
68
-
`Unable to locate driver associated with browser name: ${browser}`
68
+
`Unable to locate driver associated with browser name: ${options.getBrowserName()}`
69
69
)
70
70
}
71
71
72
-
let args = [getBinary(), '--browser', browser, '--output', 'json']
72
+
let args = [getBinary(), '--browser', options.getBrowserName(), '--output', 'json']
73
+
74
+
if (options.getBrowserVersion() && options.getBrowserVersion() !== "") {
75
+
console.log("Present browserVersion! " + options.getBrowserVersion())
76
+
args.push("--browser-version", options.getBrowserVersion())
77
+
}
78
+
73
79
let output
74
80
75
81
try {
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4