gpt4 book ai didi

Selenium::WebDriver::Error::UnknownError: newSession

转载 作者:行者123 更新时间:2023-12-03 23:16:33 26 4
gpt4 key购买 nike

我正在使用 selenium webdriver 运行我的 rspec 测试。设置如下所示:

require 'capybara/dsl'

Capybara.app = Rack::File.new File.expand_path('../fixtures', __FILE__)

require 'selenium-webdriver'

Capybara.register_driver :firefox do |app|
options = ::Selenium::WebDriver::Firefox::Options.new
options.args << '--headless' if travis?

Capybara::Selenium::Driver.new(app, browser: :firefox, options: options)
end
Capybara.default_driver = :firefox

当我运行 rspec 时,测试失败
 Failure/Error: visit '/select2-v3/index.html'

Selenium::WebDriver::Error::UnknownError:
newSession
# WebDriverError@chrome://marionette/content/error.js:178:5
# UnknownCommandError@chrome://marionette/content/error.js:472:5
# despatch@chrome://marionette/content/server.js:290:13
# execute@chrome://marionette/content/server.js:271:11
# onPacket/<@chrome://marionette/content/server.js:246:15
# onPacket@chrome://marionette/content/server.js:245:8
# _onJSONObjectReady/<@chrome://marionette/content/transport.js:490:9
# ./spec/select2_spec.rb:6:in `block (2 levels) in <top (required)>'

谷歌搜索没有给我任何结果。

你有什么想法如何解决吗?

更新: 我使用的是 firefox v63.0

最佳答案

您需要升级到最新版本的 geckodriver (v0.23.0) 才能使用 Firefox 63。

关于Selenium::WebDriver::Error::UnknownError: newSession,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53008773/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com