From 82feb10fce71a9a89076ca13bcd48f95c938cf5a Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Wed, 27 Jun 2018 11:45:13 +0200 Subject: [PATCH] Allow taking screenshots in selenium session without the need of providing parameters. --- test/browser_test_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index 8f2a25918..e34d43f31 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -122,7 +122,7 @@ class TestCase < Test::Unit::TestCase end end - def screenshot(params) + def screenshot(params = {}) instance = params[:browser] || @browser comment = params[:comment] || '' filename = "tmp/#{Time.zone.now.strftime('screenshot_%Y_%m_%d__%H_%M_%S_%L')}_#{comment}#{instance.hash}.png"