diff options
Diffstat (limited to 'qa/qa/runtime/release.rb')
-rw-r--r-- | qa/qa/runtime/release.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qa/qa/runtime/release.rb b/qa/qa/runtime/release.rb index 18a6736afcf..1cd0c62563b 100644 --- a/qa/qa/runtime/release.rb +++ b/qa/qa/runtime/release.rb @@ -1,5 +1,8 @@ # frozen_string_literal: true +require 'capybara/rspec' +require 'capybara-screenshot/rspec' + module QA module Runtime ## @@ -24,6 +27,13 @@ module QA def self.method_missing(name, *args) self.new.strategy.public_send(name, *args) + rescue + saved = Capybara::Screenshot.screenshot_and_save_page + + QA::Runtime::Logger.error("Screenshot: #{saved[:image]}") if saved&.key?(:image) + QA::Runtime::Logger.error("HTML capture: #{saved[:html]}") if saved&.key?(:html) + + raise end end end |