gpt4 book ai didi

ruby-on-rails - Capybara + Selenium + RSpec —将JS设置为true时发生LoadError

转载 作者:行者123 更新时间:2023-12-04 04:11:32 25 4
gpt4 key购买 nike

当我将其中一个rspec测试设置为:js => true时,出现以下错误。我正在使用以下版本:

滑轨— 3.2.2
Rspec-2.9.0
capybara -1.1.2

根据文档,Capybara应该在Selenium中使用:js => true来运行任何规范。我尝试将Selenium添加到我的Gemfile中,以防Capybara找不到它,但是那没用。

1) UserSignups GET /signup supports js
Failure/Error: visit signup_path
LoadError:
no such file to load -- {
"frozen": {
"app.update.auto": false,
"app.update.enabled": false,
"browser.download.manager.showWhenStarting": false,
"browser.EULA.override": true,
"browser.EULA.3.accepted": true,
"browser.link.open_external": 2,
"browser.link.open_newwindow": 2,
"browser.offline": false,
"browser.safebrowsing.enabled": false,
"browser.safebrowsing.malware.enabled": false,
"browser.search.update": false,
"browser.sessionstore.resume_from_crash": false,
"browser.shell.checkDefaultBrowser": false,
"browser.tabs.warnOnClose": false,
"browser.tabs.warnOnOpen": false,
"devtools.errorconsole.enabled": true,
"dom.disable_open_during_load": false,
"extensions.autoDisableScopes": 10,
"extensions.logging.enabled": true,
"extensions.update.enabled": false,
"extensions.update.notifyUser": false,
"network.manage-offline-status": false,
"network.http.phishy-userpass-length": 255,
"offline-apps.allow_by_default": true,
"prompts.tab_modal.enabled": false,
"security.fileuri.origin_policy": 3,
"security.fileuri.strict_origin_policy": false,
"security.warn_entering_secure": false,
"security.warn_entering_secure.show_once": false,
"security.warn_entering_weak": false,
"security.warn_entering_weak.show_once": false,
"security.warn_leaving_secure": false,
"security.warn_leaving_secure.show_once": false,
"security.warn_submit_insecure": false,
"security.warn_viewing_mixed": false,
"security.warn_viewing_mixed.show_once": false,
"signon.rememberSignons": false,
"toolkit.networkmanager.disable": true,
"toolkit.telemetry.prompted": 2,
"toolkit.telemetry.enabled": false,
"toolkit.telemetry.rejected": true
},
"mutable": {
"browser.dom.window.dump.enabled": true,
"browser.startup.page": 0,
"browser.startup.homepage": "about:blank",
"dom.max_script_run_time": 30,
"dom.report_all_js_exceptions": true,
"javascript.options.showInConsole": true,
"network.http.max-connections-per-server": 10,
"webdriver_accept_untrusted_certs": true,
"webdriver_assume_untrusted_issuer": true
}
}

最佳答案

也可以通过将multi_json升级到最新版本来解决。

关于ruby-on-rails - Capybara + Selenium + RSpec —将JS设置为true时发生LoadError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10334071/

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