小编Gop*_*hna的帖子

如何从另一个容器连接到独立的 selenium-firefox 容器

我正在尝试运行位于我的自动化容器中的自动化 GUI 测试套件。

我单独下载了独立的 selenium-firefox 映像并作为在端口 4444 上运行的容器运行。它运行在

localhost:4444/wd/hub
Run Code Online (Sandbox Code Playgroud)

现在,我正在尝试运行自动化容器中的测试套件,我使用下面的代码在无头模式下运行,以在我的 robotsframework 测试套件中达到 firefox 版本的 selenium。

Open Browser      http://www.youtube.com    headlessfirefox    remote_url=http://localhost:4444/wd/hub
Run Code Online (Sandbox Code Playgroud)

当我从我的机器运行测试套件时,这种方法工作正常,当我在自动化容器内运行它时,它会失败。

有什么方法可以让我的自动化容器到达 selenium-firefox 容器以使用浏览器。

错误:

C: 10: Open Chrome headless                                          
/usr/local/lib/python3.6/site-packages/requests/__init__.py:91: 
RequestsDependencyWarning: urllib3 (1.26.3) or chardet (3.0.4) doesn't 
match a supported version!
RequestsDependencyWarning)
[ WARN ] Retrying (Retry(total=2, connect=None, read=None, redirect=None, 
status=None)) after connection broken by 
'NewConnectionError('<urllib3.connection.HTTPConnection object at 
0x7f4a322440b8>: Failed to establish a
[ WARN ] Retrying (Retry(total=1, connect=None, read=None, redirect=None, 
status=None)) after connection broken by 
'NewConnectionError('<urllib3.connection.HTTPConnection object at …
Run Code Online (Sandbox Code Playgroud)

selenium automation selenium-webdriver docker dockerfile

3
推荐指数
1
解决办法
5671
查看次数