@@ -118,19 +118,20 @@ function getAvailableBrowsers() {
118
118
info ( `Searching for WebDriver executables installed on the current system...` )
119
119
120
120
let targets = [
121
- [ getPath ( new chrome . Options ( ) ) . driverPath , Browser . CHROME ] ,
122
- [ getPath ( new edge . Options ( ) ) . driverPath , Browser . EDGE ] ,
123
- [ getPath ( new firefox . Options ( ) ) . driverPath , Browser . FIREFOX ] ,
124
- [ getPath ( new ie . Options ( ) ) . driverPath , Browser . INTERNET_EXPLORER ] ,
125
- [ getPath ( new safari . Options ( ) ) . driverPath , Browser . SAFARI ] ,
121
+ [ getPath ( new chrome . Options ( ) ) , Browser . CHROME ] ,
122
+ [ getPath ( new edge . Options ( ) ) , Browser . EDGE ] ,
123
+ [ getPath ( new firefox . Options ( ) ) , Browser . FIREFOX ] ,
124
+ [ getPath ( new ie . Options ( ) ) , Browser . INTERNET_EXPLORER ] ,
125
+ [ getPath ( new safari . Options ( ) ) , Browser . SAFARI ] ,
126
126
]
127
127
128
128
let availableBrowsers = [ ]
129
129
for ( let pair of targets ) {
130
- const driverPath = pair [ 0 ]
130
+ const driverPath = pair [ 0 ] . driverPath
131
+ const browserPath = pair [ 0 ] . browserPath
131
132
const name = pair [ 1 ]
132
133
const capabilities = pair [ 2 ]
133
- if ( driverPath . length > 0 ) {
134
+ if ( driverPath . length > 0 && browserPath && browserPath . length > 0 ) {
134
135
info ( `... located ${ name } ` )
135
136
availableBrowsers . push ( { name, capabilities } )
136
137
}
0 commit comments