Run test case with RemoteWebDriver

To run with remote webDriver, need add two parameters, URL and Capabilities.

E.g. URL: the hub location

       Capabilities: the remote webdriver type:  firefox or chrome or IE. ..etc.

@BeforeTest

public void Setup() throws Exception {

   URL url = new URL("http://localhost:4444/wd/hub");

   Capabilities capabilities = DesiredCapabilities.firefox();

   driver = new RemoteWebDriver(url, capabilities);

}

原文地址:https://www.cnblogs.com/amy2012/p/11623636.html