Selenium webdriver 该网站可以';尝试使用selenium docker chrome节点运行selenium WebDriver脚本时出现错误

Selenium webdriver 该网站可以';尝试使用selenium docker chrome节点运行selenium WebDriver脚本时出现错误,selenium-webdriver,vagrant,docker-for-windows,selenium-hub,selenium-docker,Selenium Webdriver,Vagrant,Docker For Windows,Selenium Hub,Selenium Docker,我正在尝试使用selenium docker chrome节点在docker上运行selenium测试。我们在Windows7上运行这个。由于docker不支持windows 7,我们使用vagrant创建linux box,然后在linux box上使用docker运行selenium hub和selenium node/chrome 当我尝试使用下面的代码运行selenium脚本时,会出现“无法访问此站点”错误。然而,chrome会话成功创建,驱动程序启动了网站。但站点显示错误为“无法访问此

我正在尝试使用selenium docker chrome节点在docker上运行selenium测试。我们在Windows7上运行这个。由于docker不支持windows 7,我们使用vagrant创建linux box,然后在linux box上使用docker运行selenium hub和selenium node/chrome

当我尝试使用下面的代码运行selenium脚本时,会出现“无法访问此站点”错误。然而,chrome会话成功创建,驱动程序启动了网站。但站点显示错误为“无法访问此站点”

我的公司正在使用代理服务器。我已经在vagrant vm box和docker容器中设置了代理设置。因此,当我在linux box和docker selenium容器上使用“curl www.google.com”时,我成功地得到了响应

当我可以在容器和linux box上成功启动网站时,我不确定为什么通过selenium WebDriver启动网站时不呈现网站

我已尝试使用下面的代理设置启动WebDriver,但出现了相同的错误

Proxy proxy = new Proxy();
proxy.setProxyType(Proxy.ProxyType.MANUAL)
proxy.setHttpProxy("<username>:<password>:<proxy_url>)
ChromeOptions options = new ChromeOptions();
options.setCapability("proxy", proxy);
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), options);
driver.manage().timeouts().implicitlyWait(90, TimeUnit.SECONDS);
driver.get("http://www.google.com");
Proxy Proxy=newproxy();
proxy.setProxyType(proxy.ProxyType.MANUAL)
proxy.setHttpProxy(“::”)
ChromeOptions选项=新的ChromeOptions();
选项。设置能力(“代理”,代理);
WebDriver=新的RemoteWebDriver(新的URL(“http://localhost:4444/wd/hub",期权),;
driver.manage().timeouts().implicitlyWait(90,TimeUnit.SECONDS);
驱动程序。获取(“http://www.google.com");
Proxy proxy = new Proxy();
proxy.setProxyType(Proxy.ProxyType.MANUAL)
proxy.setHttpProxy("<username>:<password>:<proxy_url>)
ChromeOptions options = new ChromeOptions();
options.setCapability("proxy", proxy);
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), options);
driver.manage().timeouts().implicitlyWait(90, TimeUnit.SECONDS);
driver.get("http://www.google.com");