Skip to content

Commit 5e04a80

Browse files
committed
[javascript] Improving how browsers and drivers are discovered
Fixes #12456
1 parent ec2f0fb commit 5e04a80

File tree

1 file changed

+6
-2
lines changed
  • javascript/node/selenium-webdriver/testing

1 file changed

+6
-2
lines changed

javascript/node/selenium-webdriver/testing/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,13 @@ function getAvailableBrowsers() {
121121
[getPath(new chrome.Options()), Browser.CHROME],
122122
[getPath(new edge.Options()), Browser.EDGE],
123123
[getPath(new firefox.Options()), Browser.FIREFOX],
124-
[getPath(new ie.Options()), Browser.INTERNET_EXPLORER],
125-
[getPath(new safari.Options()), Browser.SAFARI],
126124
]
125+
if (process.platform === 'win32') {
126+
targets.push([getPath(new ie.Options()), Browser.INTERNET_EXPLORER])
127+
}
128+
if (process.platform === 'darwin') {
129+
targets.push([getPath(new safari.Options()), Browser.SAFARI])
130+
}
127131

128132
let availableBrowsers = []
129133
for (let pair of targets) {

0 commit comments

Comments
 (0)