@@ -6,7 +6,6 @@ const ps = require("child_process");
66const path = require ( "path" ) ;
77const { isFirefoxRunning } = require ( "./utils/firefox" ) ;
88const firefoxDriver = require ( "../../bin/firefox-driver" ) ;
9- const isWindows = / ^ w i n / . test ( process . platform ) ;
109const {
1110 getValue
1211} = require ( "devtools-config" ) ;
@@ -24,13 +23,6 @@ function handleLaunchRequest(req, res) {
2423 tcpPort : getValue ( "firefox.tcpPort" )
2524 } ;
2625 if ( ! isRunning ) {
27- process . on ( 'unhandledRejection' , ( err ) => {
28- if ( err . message . indexOf ( 'Could not locate Firefox on the current system' ) > - 1 ) {
29- console . error ( 'selenium-webdriver could not locate Firefox, please launch it manually.' ) ;
30- } else {
31- throw err ;
32- }
33- } ) ;
3426 firefoxDriver . start ( location , options ) ;
3527 res . end ( "launched firefox" ) ;
3628 } else {
@@ -41,11 +33,7 @@ function handleLaunchRequest(req, res) {
4133
4234 if ( browser == "Chrome" ) {
4335 const chromeDriver = path . resolve ( __dirname , "../../bin/chrome-driver.js" ) ;
44- if ( isWindows ) {
45- ps . spawn ( 'node' , [ chromeDriver , "--location" , location ] ) ;
46- } else {
47- ps . spawn ( chromeDriver , [ "--location" , location ] ) ;
48- }
36+ ps . spawn ( 'node' , [ chromeDriver , "--location" , location ] ) ;
4937 res . end ( "launched chrome" ) ;
5038 }
5139}
0 commit comments