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) 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_screenshot(screenshot)
>     embed screenshot, 'image/png'
>   end
> end
>
>
> error I see in the log now is
>
> undefined local variable or method `ie' for #<Object:0x3361d10> (NameError)
>
> C:/Users/Darkhudson/Desktop/DEMO/watirDemo/workspace/features/support/hooks.rb:5:in
>  `After'
>
>
> and it highlights this line as the syntax error
>
> *ie.save_screenshot(screenshot) *
>
>>
>>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to