如何在Watir中使用console.log?

时间:2020-12-26 16:56:38

How can I log to console in watir? Or break in the code. Like Javascripts console.log or debugger statements.

如何在watir中登录到控制台?或者打破代码。像Javascripts console.log或调试器语句。

puts doesn't seem to work for me.

看跌似乎不适合我。

1 个解决方案

#1


2  

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

您可以通过设置$ DEBUG = true将完整的调试信息输出到控制台

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

尽管如此,puts应该仍然有效,所以我不确定你的系统中发生了什么。

#1


2  

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

您可以通过设置$ DEBUG = true将完整的调试信息输出到控制台

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

尽管如此,puts应该仍然有效,所以我不确定你的系统中发生了什么。