当前位置:首页 > Web开发 > 正文

Run test case with RemoteWebDriver

2024-03-31 Web开发

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

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/8602.html