📜  如何创建远程 webdriver - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:41.288000             🧑  作者: Mango

代码示例1
String hubURL = "http://myip:4444/wd/hub";
    DesiredCapabilities capability = DesiredCapabilities.chrome();
    capability.setBrowserName("internet explorer");
    capability.setPlatform("WINDOWS");
    capability.setVersion("9.0.4");
    WebDriver driver = new RemoteWebDriver(new URL(hubURL), capability);
    driver.get("http://www.google.com");