Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Skip browser logs retrieval when not available

Christophe Bliard995f8d0f9cb2
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb
index 5d09485db7d..56b37ab4b85 100644
--- a/spec/support/capybara.rb
+++ b/spec/support/capybara.rb
@@ -83,6 +83,7 @@ module Capybara::CaptureBrowserLogs
return unless example.example_group.include?(Capybara::DSL)
return unless failed?(example)
return if Capybara.page.current_url.blank?
+ return unless Capybara.page.driver.browser.respond_to?(:manage)
logs = Capybara.page.driver.browser.manage.instance_variable_get(:@bridge).log("browser")
example.metadata[:browser_logs] = logs