我试图使用webdriverio自动化firefox浏览器,将其连接到selenium 4.5网格,但是,我在grid节点上看到了以下错误:
Response code 400. Message: Argument --remote-debugging-port can't be set via capabilities我指向Selenium4.5Hub的本地主机实例及其节点。具有chrome功能的同一节点可用于执行Google
现在,如果我删除wdio.conf.ts中的主机/端口规范并关闭本地集线器,我就能够运行火狐浏览器,尽管它是在安装傀儡并将火狐二进制文件命名为夜间之后运行的。
(研究并使其在wdio.conf.ts中使用以下最小的“功能”配置)
{
browserName: 'firefox',
'moz:firefoxOptions': {
binary: '/Applications/Firefox.app/Contents/MacOS/firefox-nightly',
}
}我的假设是,我应该能够让它在没有傀儡机的情况下工作,在一个具有firefox功能的所需节点的远程机器上。
我参考了https://www.selenium.dev/documentation/grid/configuration/cli_options/并签出了驱动程序配置以及一个配置文件(toml),如:
[node]
detect-drivers = false
[[node.driver-configuration]]
max-sessions = 1
display-name = "Firefox"
stereotype = "{\"browserName\": \"firefox\", \"browserVersion\": \"105.0.1\", \"platformName\": \"MAC\", \"moz:firefoxOptions\": {\"binary\": \"/Applications/Firefox.app/Contents/MacOS/firefox-nightly\"}}"
webdriver-executable = '/usr/local/bin/geckodriver'(我有一个软件链接,指向火狐-每晚指向原来的二进制作品与木偶师,如上文所述。)对于节点配置也尝试了原始二进制)
有人能共享硒网格4.5配置/选项的正确配置/依赖/链接吗?
提亚
发布于 2022-10-19 17:10:53
我为windows节点添加了这样的toml文件:
C:\grid>java -jar selenium-server-4.5.0.jar node --publish-events tcp://myserver:6656 --subscribe-events tcp://myserver:6657 --config firefox.toml在我定义的toml文件中:
[node]
detect-drivers = false
[[node.driver-configuration]]
display-name = "Firefox"
webdriver-executable = "C:\\\\grid\\geckodriver.exe"
max-sessions = 2
stereotype = "{\"browserName\": \"firefox\", \"browserVersion\": \"102.3\", \"moz:firefoxOptions\": {\"binary\":\"C:\\\\Firefox\\firefox.exe\"}}"https://stackoverflow.com/questions/73937184
复制相似问题