在特定节点上执行Selenium脚本

时间:2019-04-10 07:31:42

标签: java selenium docker selenium-grid remotewebdriver

我正在尝试对节点池(主要是docker容器)中的特定节点执行测试,这些节点已使用容器的ip地址并将其传递到远程Web驱动程序中,例如

driver = new RemoteWebDriver(new URL("http://IP of container:port/wd/hub"), options);

我尝试将容器节点IP和端口号一起传递

ChromeOptions options = new ChromeOptions();`enter code here`
        options.setCapability(CapabilityType.PLATFORM_NAME, Platform.LINUX);
        options.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
        driver = new RemoteWebDriver(new URL("http://containernodeIP:port/wd/hub"), options);

我希望脚本能在我提到的特定容器节点上执行。但是它说UnreachableBrowserException:无法开始新的会话。可能的原因是远程服务器的地址无效或浏览器启动失败

0 个答案:

没有答案