Allow taking screenshots in selenium session without the need of providing parameters.
This commit is contained in:
parent
d4ac9302d8
commit
82feb10fce
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ class TestCase < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def screenshot(params)
|
def screenshot(params = {})
|
||||||
instance = params[:browser] || @browser
|
instance = params[:browser] || @browser
|
||||||
comment = params[:comment] || ''
|
comment = params[:comment] || ''
|
||||||
filename = "tmp/#{Time.zone.now.strftime('screenshot_%Y_%m_%d__%H_%M_%S_%L')}_#{comment}#{instance.hash}.png"
|
filename = "tmp/#{Time.zone.now.strftime('screenshot_%Y_%m_%d__%H_%M_%S_%L')}_#{comment}#{instance.hash}.png"
|
||||||
|
|
Loading…
Reference in a new issue