Score: Neutral
General Comment:
What is the intended use case?
Note that at the moment you cannot construct a RemoteWebDriver instance
without creating a new session. If you want to create an instance of
RemoteWebDriver that controls an existing session, it may be easier to
create a new c'tor that gets the session ID as a parameter (in addition to
the URL). However, you still need a way to query the remote server about
the session's capabilities - otherwise the capabilities object will remain
null.
For more information:
http://code.google.com/p/selenium/source/detail?r=15519
General Comment:
My use case is as follows.
I use this driver to run tests for a desktop application with embedded
gecko engine. I've integrated WebDriver plugin into the application so that
it starts automatically. For some reasons I don't know yet, I can't create
several sessions to this application -- only first session runs, other ones
just hang. So I forced to connect to the same session.
To implement this, I've created a class that extends RemoteWebDriver. On
the first run it creates a new session and store its parameters to a file.
On the next run it restores session parameters from the file and reuses the
session.
I do all the magic with session parameters in startSession method (it
either starts a new session or connects to the existing one), I don't think
that passing session id to the constructor would be better.