Closed GoogleCodeExporter closed 9 years ago
Start Selenium Server already accepts *params, which can be used to pass
arbitrary command line options to Selenium Server startup.
Is there a reason you cannot use that?
Original comment by janne.t....@gmail.com
on 6 Aug 2012 at 10:21
As I understant *params provides custom command line options to Selenium server
and I need a custom options to java process which runs Selenium server:
java <my options> -jar jarpath + _server_startup_params(params)
which can be seen at the bottom of my patch above.
I needed this to route all traffic through proxy to log all HTTP requests and
responses.
Original comment by chmielss...@gmail.com
on 6 Aug 2012 at 12:28
Correct patch:
--- SeleniumLibrary/__init__.py (wersja 15373)
+++ SeleniumLibrary/__init__.py (kopia robocza)
@@ -82,7 +82,10 @@
if not jarpath:
jarpath = SELENIUM_SERVER_PATH
params = _add_default_user_extension(jarpath, list(params))
+ if 'SELENIUM_JAVA_OPTS' in os.environ:
+ java_opts=os.environ['SELENIUM_JAVA_OPTS'].split(' ')
+ else:
+ java_opts=[]
return ['java'] + java_opts + [ '-jar', jarpath] + _server_startup_params(params)
def _add_default_user_extension(jarpath, params):
Original comment by chmielss...@gmail.com
on 6 Aug 2012 at 2:21
You are correct, I read the patch too fast.
I still do not think that configuring some things via keyword arguments and
others via environment variables is the best possible approach.
Unfortunately, it is also quite difficult to change the signature of
start_selenium_server without backwards incompatibility issues. One option
could be to accept some special name in *params, but that's quite obscure too.
I'll think about this a bit, but something will definitely be done.
Original comment by janne.t....@gmail.com
on 6 Aug 2012 at 5:12
Going to fix this by adding special check in Start Selenium Server for argument
named JVM.
So, after the fix, this will work:
Start Selenium Server JVM=-Dsomething --ensureCleanSession
which translates to
java -Dsomething selenium-server.jar -ensureCleanSession
Original comment by janne.t....@gmail.com
on 27 Aug 2012 at 1:07
This issue was updated by revision 5dbeb11bdbd9.
Original comment by janne.t....@gmail.com
on 28 Aug 2012 at 4:55
Original issue reported on code.google.com by
chmielss...@gmail.com
on 21 Jun 2012 at 1:46