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);

}

你可能感兴趣的:(Run test case with RemoteWebDriver)