在selenium设置的正式文档中,我看到了一个包含以下信息的config.toml文件
[docker]
# Configs have a mapping between the Docker image to use and the capabilities that need to be matched to
# start a container with the given image.
configs = [
"selenium/standalone-firefox:4.3.0-20220706", "{\"browserName\": \"firefox\"}",
"selenium/standalone-chrome:4.3.0-20220706", "{\"browserName\": \"chrome\"}",
"selenium/standalone-edge:4.3.0-20220706", "{\"browserName\": \"MicrosoftEdge\"}"
]
# URL for connecting to the docker daemon
# Most simple approach, leave it as http://127.0.0.1:2375, and mount /var/run/docker.sock.
# 127.0.0.1 is used because interally the container uses socat when /var/run/docker.sock is mounted
# If var/run/docker.sock is not mounted:
# Windows: make sure Docker Desktop exposes the daemon via tcp, and use http://host.docker.internal:2375.
# macOS: install socat and run the following command, socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock,
# then use http://host.docker.internal:2375.
# Linux: varies from machine to machine, please mount /var/run/docker.sock. If this does not work, please create an issue.
url = "http://127.0.0.1:2375"
# Docker image used for video recording
video-image = "selenium/video:ffmpeg-4.3.1-20220706"
# Uncomment the following section if you are running the node on a separate VM
# Fill out the placeholders with appropriate values
[server]
host = <ip-from-node-machine>
port = <port-from-node-machine>下面两个参数表示主机和端口
FYI-我计划在一个VM中运行集线器容器,在另一个VM中运行节点容器。如果我错了,我猜config.toml文件应该出现在我们将运行节点的VM中。
因此,对于,对于host=,我们是否需要给出集线器在哪里启动和运行的信息?对于port=,我们在哪里得到端口号?期待尽快得到答案,谢谢
发布于 2022-09-09 07:52:30
是的,主机和端口值是Hub运行位置的详细信息。如果集线器在默认端口上运行,则端口编号为4444。
https://stackoverflow.com/questions/72995256
复制相似问题