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

}

posted on 2019-10-04 23:09  子子清清  阅读(101)  评论(0编辑  收藏  举报

导航