首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用不同VM的Selenium4动态网格设置

使用不同VM的Selenium4动态网格设置
EN

Stack Overflow用户
提问于 2022-07-15 14:05:51
回答 1查看 269关注 0票数 0

在selenium设置的正式文档中,我看到了一个包含以下信息的config.toml文件

代码语言:javascript
复制
[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=,我们在哪里得到端口号?期待尽快得到答案,谢谢

EN

回答 1

Stack Overflow用户

发布于 2022-09-09 07:52:30

是的,主机端口值是Hub运行位置的详细信息。如果集线器在默认端口上运行,则端口编号为4444

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72995256

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档