Allow to use a configured WebDriver when running with test browser (java).

Completes commit 5feba5c1 which covered the scala side only.