0

I've been using the selenium-server-standalone-2.53.0.jar and recently tried to upgrade to version 3.0.0-beta3.

I'm attempting to spin-up a hub using the maxInstances parameter with the following command:

java -jar %~dp0DriverRepo\selenium-server-standalone-3.0.0-beta3.jar -role hub -port 5555 -maxInstances 9

This was working in 2.53.0, but in 3.0.0-beta3 I'm met with the following exception:

Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -maxInstances
    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.<init>(JCommander.java:210)
    at org.openqa.grid.selenium.GridLauncherV3$2.setConfiguration(GridLauncherV3.java:224)
    at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:138)
    at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:67)

Apparently maxInstances is no longer a valid argument. I've searched for documentation regarding any changes that may have been made for use of the maxInstances parameter but I've had no luck. Has anyone else run into this issue, or is anyone aware of the proper way to spin-up a hub in 3.0.0-beta3 in a comparable way?

T.D.
  • 73
  • 7

1 Answers1

0

I don't remember ever using an argument called maxInstances. I think that earlier there was no validation for invalid command line arguments but with Selenium 3, they perhaps enabled it.

Here's an example of why I feel my theory is true

Selenium 2.53.1 output wherein I am providing an invalid argument named krishnan selenium-server -role hub -krishnan 100 22:28:37.762 INFO - Launching Selenium Grid hub 2016-09-26 22:28:38.366:INFO::main: Logging initialized @758ms 22:28:38.378 INFO - Will listen on 4444 22:28:38.421 INFO - Will listen on 4444 2016-09-26 22:28:38.424:INFO:osjs.Server:main: jetty-9.2.z-SNAPSHOT 2016-09-26 22:28:38.452:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@32eebfca{/,null,AVAILABLE} 2016-09-26 22:28:38.479:INFO:osjs.ServerConnector:main: Started ServerConnector@6ec8211c{HTTP/1.1}{0.0.0.0:4444}

And here's how Selenium 3 beta version behaves for the same command line.

java -jar selenium-server-standalone-3.0.0-beta2.jar -role hub -krishnan 100 Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -krishnan 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.<init>(JCommander.java:210) at org.openqa.grid.selenium.GridLauncherV3$2.setConfiguration(GridLauncherV3.java:216) at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:130) at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:67)

Selenium has never had any argument named maxInstances. It only had something called maxSession`.

The only usage for maxInstances has been within a node configuration file as shown here which is passed to a Selenium node via the -nodeConfig argument. This represents the number of concurrent browser instances per browser flavor that can be opened up in a node.

Krishnan Mahadevan
  • 14,121
  • 6
  • 34
  • 66
  • I see. You're 100% correct. I've had a useless argument in there the whole time and thought it was required. I must have incorrectly pulled it from an unrelated example when I was first setting things up. Thanks for pointing that out! – T.D. Sep 26 '16 at 17:32