0

我想打印在 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'",`
4

0 回答 0