i'm writing here to ask if is possible to init WebDriver
WebDriver driver = new FirefoxDriver();
and use the same browser for many jar application, so doing, in other jar file, something like:
int port = ...;
String host = ...;
WebDriver driver = getDriver(host,port);
i ask this question because FirefoxDriver is very slow to load and happear, and i need to call many jar that load that driver. i think that in this way, loading just one time my driver, my total application will be fastly than open N-times N-instances of that driver. i hope that my question is clear and well-formed :) thanks to all!
EDIT:
i see that there is the possibility to use RemoteWebDriver.
DesiredCapabilities capability = DesiredCapabilities.firefox();
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), capability);
How can i use it? when i have to instantiate the webdriver in localhost:4444?