Selenium Grid with Docker containers on different hosts

三世轮回 提交于 2019-12-05 21:42:52

After some more research, I've found out that no extra ambassador container is necessary. The node and hub can communicate directly after setting the appropriate parameters / environment variables REMOTE_HOST, HUB_PORT_4444_TCP_ADDR, HUB_PORT_4444_TCP_PORT. There is also a respective resolved issue https://github.com/SeleniumHQ/docker-selenium/issues/51

To put it in a nutshell, just execute the following commands:

Hub

$ docker run -d -p 4444:4444 --name selenium-hub selenium/hub:2.47.1

Node

$ docker run -d -p 5555:5555 -e REMOTE_HOST="http://<PASTE-NODE-IP>:5555" -e HUB_PORT_4444_TCP_ADDR="<PASTE-HUB-IP>" -e HUB_PORT_4444_TCP_PORT="4444" --name chrome-node selenium/node-chrome:2.47.1
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!