From 59750ebfef667cf50804219ebe72690c1db88d8a Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Mon, 7 Aug 2017 13:21:11 -0700 Subject: [PATCH] add driver options for generating geckodriver trace log - default commented --- spec/selenium_spec_marionette.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/spec/selenium_spec_marionette.rb b/spec/selenium_spec_marionette.rb index c3d09aa5..beb1932d 100644 --- a/spec/selenium_spec_marionette.rb +++ b/spec/selenium_spec_marionette.rb @@ -7,10 +7,15 @@ require 'rspec/shared_spec_matchers' ENV['MOZ_HEADLESS']='1' if ENV['HEADLESS'] Capybara.register_driver :selenium_marionette do |app| + # ::Selenium::WebDriver.logger.level = "debug" Capybara::Selenium::Driver.new( app, - browser: :firefox, - desired_capabilities: {marionette: true} + :browser => :firefox, + :desired_capabilities => {:marionette => true, + }, + # Get a trace level log from geckodriver + # :firefox_options => {"log": {"level": "trace"}}, + # :driver_opts => { args: ['-vv'] } ) end @@ -24,6 +29,8 @@ Capybara.register_driver :selenium_marionette_clear_storage do |app| ) end + + module TestSessions SeleniumMarionette = Capybara::Session.new(:selenium_marionette, TestApp) end