[wtr-general] Re: [Cucumber] Screenshots with Cucumber/Watir on Windows 7 with IE9

2012-11-15 Thread Jarmo Pertman
In that case you have to find out how to share that variable between the scope where you make the browser and After block. I haven't used Cucumber so much so i can't help you with that. Sorry. Jarmo On Thursday, November 15, 2012 5:15:52 AM UTC+2, Ry wrote: > > ie happens to be my browser varia

[wtr-general] Re: [Cucumber] Screenshots with Cucumber/Watir on Windows 7 with IE9

2012-11-14 Thread Ry
ie happens to be my browser variable ie = Watir::Browser.new On Monday, November 12, 2012 4:11:48 AM UTC-8, Jarmo Pertman wrote: > > Instead of just using "ie", use the browser variable name which is used > everywhere else in your tests. > > Jarmo Pertman > - > IT does really matter - http:/

[wtr-general] Re: [Cucumber] Screenshots with Cucumber/Watir on Windows 7 with IE9

2012-11-12 Thread Jarmo Pertman
Instead of just using "ie", use the browser variable name which is used everywhere else in your tests. Jarmo Pertman - IT does really matter - http://itreallymatters.net On Sunday, November 11, 2012 8:04:28 PM UTC+2, Ry wrote: > > Thank you. > > 1) I removed the 'include watir" line > > 2)

[wtr-general] Re: [Cucumber] Screenshots with Cucumber/Watir on Windows 7 with IE9

2012-11-11 Thread Ry
Thank you. 1) I removed the 'include watir" line 2) updated my hooks.rb After do |scenario| if scenario.failed? Dir::mkdir('screenshots') if not File.directory?('screenshots') screenshot = "./screenshots/FAILED_#{scenario.name.gsub(' ','_').gsub(/[^0-9A-Za-z_]/, '')}.png" ie.save_

[wtr-general] Re: [Cucumber] Screenshots with Cucumber/Watir on Windows 7 with IE9

2012-11-11 Thread Jarmo Pertman
1) Do not perform "include Watir" - it is not necessary and will clutter the global objects namespace. 2) Use this code for saving screenshots: ie.save_screenshot screenshot Jarmo Pertman - IT does really matter - http://itreallymatters.net On Sunday, November 11, 2012 1:52:58 AM UTC+2, R