theintern / digdug

A JavaScript library for launching WebDriver service tunnels.
https://theintern.github.io/digdug/
Other
44 stars 28 forks source link

SeleniumTunnel: Can't start Selenium 3.0.0+ #35

Closed bdpartridge closed 8 years ago

bdpartridge commented 8 years ago

Description Can't start Selenium version 3.0.0+ with SeleniumTunnel. The root cause appears to be related to the new requirement that "-D" parameters be passed to the java CLI before the "-jar" parameter. See https://github.com/SeleniumHQ/selenium/issues/2566 for additional details.

Steps to Reproduce digdug: 1.5.0 Node: 4.1.1 OS: Mac OS X El Capitan (10.11.6)

Expected Result DigDug starts Selenium 3.0.0+.

Actual Result Selenium fails to start. Here's a sample stack trace:

`Listening on 0.0.0.0:9000 Error: Tunnel failed to start: Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -Dwebdriver.chrome.driver=/Users/bpartridge/forward/fwd/web/src/main/resources/web/node_modules/intern/node_modules/digdug/selenium-standalone/chromedriver at com.beust.jcommander.JCommander.parseValues(JCommander.java:742) at com.beust.jcommander.JCommander.parse(JCommander.java:282) at com.beust.jcommander.JCommander.parse(JCommander.java:265) at com.beust.jcommander.JCommander.(JCommander.java:210) at org.openqa.grid.selenium.GridLauncherV3$1.setConfiguration(GridLauncherV3.java:219) at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:147) at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:73)

at handleChildExit <node_modules/intern/node_modules/digdug/Tunnel.js:336:16> at ChildProcess. <node_modules/intern/node_modules/digdug/Tunnel.js:371:6> at emitTwo events.js:92:20 at ChildProcess.emit events.js:172:7 at Process.ChildProcess._handle.onexit <internal/child_process.js:200:12>`

I'd be happy to submit a PR for this if that would help.

jason0x43 commented 8 years ago

This should be a pretty straightforward fix. Selenium 3 is pickier about command line argument ordering. All -D options need to come before the -jar option. (See https://github.com/SeleniumHQ/selenium/issues/2566.)

bdpartridge commented 8 years ago

Great! Thanks for fixing this.