Editing the example "Example Logging" in the Watir Wiki site may be useful for beginners

9 views
Skip to first unread message

Margam

unread,
Jan 6, 2009, 8:16:57 PM1/6/09
to Watir General
Hello,
I was trying to follow the example provided in the site:http://
wiki.openqa.org/display/WTR/Example+Logging
but had some problems.

I downloaded the "example_logger1.rb" and used the example code
(provided by Jonathan Kohl), but kept getting the following error
when tried to execute:
./example_logger1.rb:24: uninitialized constant Watir::WatirLogger
(NameError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
from test_logger.rb:6

I am using:
XP machine
IE 7
Watir 1.6.2
Ruby 1.8.6

After researching for a while, found out from another question on the
Watir group site:http://groups.google.com/group/watir-general/
browse_thread/thread/11407c6613aed0a1
that "require 'logger'" and "require 'watir/logger'" may need to be
added.

After adding these lines to either the main example code or the
"example_logger1.rb" file, the example worked perfectly.

So I was wondering if this info or modification can be added either in
the "example_logger1.rd" file or in the main example code itself. This
would save some time for many of the new comers like me.

Thank you very much for Scott and Kohl for providing the codes.

Margam

Alister Scott

unread,
Jan 7, 2009, 1:20:04 AM1/7/09
to Watir General
Hi Margam
I have updated and uploaded example_logger1.rb to the wiki:
http://wiki.openqa.org/display/WTR/Example+Logging
In the future you can easily sign up for a wiki logon and attach the
updated file yourself.
Cheers,
Alister

Karthikeyan Margam

unread,
Jan 7, 2009, 12:37:02 PM1/7/09
to watir-...@googlegroups.com
Hi Alister,
Thank you for the update. In future I will follow your instructions.

Margam
Reply all
Reply to author
Forward
0 new messages