Adam Thompson Adam Thompson - 1 month ago 22
Ruby Question

How to console.log in Watir?

How can I log to console in

watir
? Or break in the code. Like Javascripts
console.log
or
debugger
statements.

puts
doesn't seem to work for me.

Answer

You can get full debugging info output to console by setting $DEBUG = true

puts should still work, though, so I'm not sure what is going on in your system.