Allow taking screenshots in selenium session without the need of providing parameters.

This commit is contained in:
Thorsten Eckel 2018-06-27 11:45:13 +02:00
parent d4ac9302d8
commit 82feb10fce

View file

@ -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"