我想在watir gem文件中打印函数的当前时间。
例如: 在/watir/element/select.rb里面
我需要打印当前时间,考虑调用select_by的时间。我尝试添加
require 'time'
..
..
def select_by
puts Time.now
..
但是,它显示错误为
`NoMethodError in setup: undefined method `now' for Watir::Time:Class",
"C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/page-object-2.1.1/lib/page-object/platforms/watir/page_object.rb:1068:in `instance_eval'"
"(eval):1:in `process_watir_call'",`