无法创建新服务:带有webdrivermanager的chromedriverservice

fivyi3re  于 2021-07-12  发布在  Java
关注(0)|答案(0)|浏览(197)

我无法创建新服务:带webdrivermanager的chromedriverservice。规格如下:
集线器: java -jar selenium-server-standalone-3.141.59.jar -role hub 节点: java -jar selenium-server-standalone-3.141.59.jar -role webdriver -hub http://192.168.1.219:4444/grid/register -port 5555 代码:

public class DesiredCap {

static WebDriver driver;
static String nodeurl;

@BeforeTest
public static void cap() {
    try {
        WebDriverManager.chromedriver().setup();
        nodeurl = "http://192.168.1.219:4444/wd/hub";
        DesiredCapabilities dccaps = new DesiredCapabilities();
        dccaps.setBrowserName("chrome");
        driver = new RemoteWebDriver(new URL(nodeurl), dccaps);
        driver.get("http://asos:123@192.168.1.46/EmpEvaluation");
    } catch (MalformedURLException e) {
        e.printStackTrace();
    }
}

@Test
public void name() {

}

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题