2 fixes to behaviour and implement built in support for RemoteWebDriver

Hi,

We'd like to use selenese-runner-java with Saucelabs, which uses a RemoteWebDriver connection to the "cloud" of browsers, and picks browsers using capabilities. I've implemented a RemoteWebDriverFactory implementation that makes this easier to do from the commandline.

I also fixed a couple of problems that prevented our suites running correctly:

The first was making customVars persist across test cases. We sometimes set up environment variables in a first test case of a suite, then re-use those variables in other cases. Selenium IDE supports this, so I imagine it's an intended feature.

Second was to tune Assertion.doCommand() to not assume that polling a browser for a waitFor* command is instant. Over a web service connection to a remote WebDriver the polls can take around 0.5 seconds each time, so a 30 second timeout ends up being 300 polls (retryCount) each taking 0.5+0.1=0.6 seconds. That makes a 30 second timeout into a 180 second timeout. I fixed this by simply checking that not too much time has elapsed during the looping and breaking out of the loop if a time limit is reached.

Hope you like these commit!


Neil