Rails 从 chromedriver-helper 到 webdriver 的更新显示 W3C 标准错误
Rails update from chromedriver-helper to webdriver shows W3C standard error
我将我的应用程序从 chromedriver-helper
更新为 webdriver
,但之后我的规格中出现了错误。它在几种情况下失败并出现相同的错误
Failure/Error: Unable to infer file and line number from backtrace
Selenium::WebDriver::Error::UnknownCommandError:
unknown command: Cannot call non W3C standard command while in W3C mode
我遵循了这个指南 https://everydayrails.com/2019/04/09/chromedriver-helper-webdrivers.html but there are no single word about it. I think it's quite similar issue with this one Cannot call non W3C standard command while in W3C mode (Selenium::WebDriver::Error::UnknownCommandError) with Selenium ChromeDriver in Cucumber Ruby 但我没有看到任何相关的答案(他们实际上没有将 chromedriver-helper
切换到 webdriver
)
gemfile.rb
group :development, :test do
gem "awesome_print", require: "ap"
gem "capybara"
gem "webdrivers"
gem "factory_bot_rails"
gem "faraday-detailed_logger"
gem "pry"
gem "rspec-rails"
gem "site_prism"
end
尝试将 capybara
更新到最新版本(如果尚未更新),看看是否有帮助。从 chromedriver-helper
移动到 webdrivers
并更新 capybara
到 3.15.1
后,我看到了类似的问题。
我将我的应用程序从 chromedriver-helper
更新为 webdriver
,但之后我的规格中出现了错误。它在几种情况下失败并出现相同的错误
Failure/Error: Unable to infer file and line number from backtrace Selenium::WebDriver::Error::UnknownCommandError: unknown command: Cannot call non W3C standard command while in W3C mode
我遵循了这个指南 https://everydayrails.com/2019/04/09/chromedriver-helper-webdrivers.html but there are no single word about it. I think it's quite similar issue with this one Cannot call non W3C standard command while in W3C mode (Selenium::WebDriver::Error::UnknownCommandError) with Selenium ChromeDriver in Cucumber Ruby 但我没有看到任何相关的答案(他们实际上没有将 chromedriver-helper
切换到 webdriver
)
gemfile.rb
group :development, :test do
gem "awesome_print", require: "ap"
gem "capybara"
gem "webdrivers"
gem "factory_bot_rails"
gem "faraday-detailed_logger"
gem "pry"
gem "rspec-rails"
gem "site_prism"
end
尝试将 capybara
更新到最新版本(如果尚未更新),看看是否有帮助。从 chromedriver-helper
移动到 webdrivers
并更新 capybara
到 3.15.1
后,我看到了类似的问题。