selenium-standalone icon indicating copy to clipboard operation
selenium-standalone copied to clipboard

Support classpath

Open existdissolve opened this issue 10 years ago • 3 comments

Any plans to support classpath? I think this would be a nice feature, especially for supporting things like custom servlets and proxies. The basic idea, I think, would be similar to what is done here:

https://github.com/jhoblitt/puppet-selenium

classpath: Optional classpath to pass to Selenium Server Node at startup. If this array is empty Selenium will be started with '-jar /path/to/selenium.jar', if not empty Selenium will be started with '-cp /path/to/selenium.jar: org.openqa.grid.selenium.GridLauncher' See http://www.seleniumhq.org/docs/07_selenium_grid.jsp#customizing-the-grid

Thanks for your consideration!!

existdissolve avatar Aug 09 '16 23:08 existdissolve

I believe that should be supported already through the cli

selenium-standalone start -- -cp /custom/lib1.jar

or the api

selenium.start({
  seleniumArgs: ['-cp /custom/lib1.jar']
}, function(err, child) {
});

Let me know if that doesn't work.

stephenash avatar Aug 10 '16 01:08 stephenash

@stephenash Thanks for the response! I tried both of those approaches, but didn't have any success. I believe you have to use the -cp /my/classpaths: org.openqa.grid.selenium.GridLauncher to get it to load the custom servlet successfully. When I follow the examples on the Selenium Grid page that discusses this, it works as expected. Thanks!

existdissolve avatar Aug 10 '16 01:08 existdissolve

Closing since this appears to be supported as long as the syntax (or similar) listed in https://github.com/vvo/selenium-standalone/issues/202#issuecomment-238744407 is used.

stephenash avatar Aug 17 '17 00:08 stephenash