RSpecでテストコードを実行したときエラーが出ます
$ bundle exec rspec spec/system/posts_spec.rb 2020-02-16 12:16:04 WARN Selenium [DEPRECATION] Selenium::WebDriver::Chrome#driver_path= is deprecated. Use Selenium::WebDriver::Chrome::Service#driver_path= instead. Capybara starting Puma... * Version 3.12.2 , codename: Llamas in Pajamas * Min threads: 0, max threads: 4 * Listening on tcp://127.0.0.1:49712 F Failures: 1) 塩分管理機能 一覧表示機能 ユーザーAがログインしているとき ユーザーAが作成した投稿が表示される Got 0 failures and 2 other errors: 1.1) Failure/Error: visit login_path Selenium::WebDriver::Error::SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 80 # 0 chromedriver 0x0000000107ce0329 chromedriver + 3838761 # 1 chromedriver 0x0000000107c7a123 chromedriver + 3420451 # 2 chromedriver 0x00000001079ee62f chromedriver + 751151 # 3 chromedriver 0x000000010794ffa6 chromedriver + 102310 # 4 chromedriver 0x000000010794bf7f chromedriver + 85887 # 5 chromedriver 0x000000010797b473 chromedriver + 279667 # 6 chromedriver 0x00000001079782b3 chromedriver + 266931 # 7 chromedriver 0x00000001079520bd chromedriver + 110781 # 8 chromedriver 0x0000000107953055 chromedriver + 114773 # 9 chromedriver 0x0000000107ca1ebf chromedriver + 3583679 # 10 chromedriver 0x0000000107caee4a chromedriver + 3636810 # 11 chromedriver 0x0000000107caebe7 chromedriver + 3636199 # 12 chromedriver 0x0000000107c85839 chromedriver + 3467321 # 13 chromedriver 0x0000000107caf707 chromedriver + 3639047 # 14 chromedriver 0x0000000107c97cc7 chromedriver + 3542215 # 15 chromedriver 0x0000000107cc5324 chromedriver + 3728164 # 16 chromedriver 0x0000000107ce6387 chromedriver + 3863431 # 17 libsystem_pthread.dylib 0x00007fff7b80b661 _pthread_body + 340 # 18 libsystem_pthread.dylib 0x00007fff7b80b50d _pthread_body + 0 # 19 libsystem_pthread.dylib 0x00007fff7b80abf9 thread_start + 13 # ./spec/system/posts_spec.rb:12:in `block (4 levels) in <top (required)>' 1.2) Failure/Error: Unable to infer file and line number from backtrace Selenium::WebDriver::Error::SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 80 # 0 chromedriver 0x0000000107ce0329 chromedriver + 3838761 # 1 chromedriver 0x0000000107c7a123 chromedriver + 3420451 # 2 chromedriver 0x00000001079ee62f chromedriver + 751151 # 3 chromedriver 0x000000010794ffa6 chromedriver + 102310 # 4 chromedriver 0x000000010794bf7f chromedriver + 85887 # 5 chromedriver 0x000000010797b473 chromedriver + 279667 # 6 chromedriver 0x00000001079782b3 chromedriver + 266931 # 7 chromedriver 0x00000001079520bd chromedriver + 110781 # 8 chromedriver 0x0000000107953055 chromedriver + 114773 # 9 chromedriver 0x0000000107ca1ebf chromedriver + 3583679 # 10 chromedriver 0x0000000107caee4a chromedriver + 3636810 # 11 chromedriver 0x0000000107caebe7 chromedriver + 3636199 # 12 chromedriver 0x0000000107c85839 chromedriver + 3467321 # 13 chromedriver 0x0000000107caf707 chromedriver + 3639047 # 14 chromedriver 0x0000000107c97cc7 chromedriver + 3542215 # 15 chromedriver 0x0000000107cc5324 chromedriver + 3728164 # 16 chromedriver 0x0000000107ce6387 chromedriver + 3863431 # 17 libsystem_pthread.dylib 0x00007fff7b80b661 _pthread_body + 340 # 18 libsystem_pthread.dylib 0x00007fff7b80b50d _pthread_body + 0 # 19 libsystem_pthread.dylib 0x00007fff7b80abf9 thread_start + 13 Finished in 2.54 seconds (files took 3.33 seconds to load) 1 example, 1 failure Failed examples: rspec ./spec/system/posts_spec.rb:18 # 塩分管理機能 一覧表示機能 ユーザーAがログインしているとき ユーザーAが作成した投稿が表示される
ドライバの設定は以下の通りです。
cofig/spec/spec_helper.rb
1 2require "capybara/rspec" 3 4RSpec.configure do |config| 5 config.before(:each, type: :system) do 6 driven_by :selenium_chrome_headless 7 end 8
解決方法がわかればご回答宜しくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/02/16 05:57