module Cello::PageObjects::LogHelper
Public Instance Methods
logger(name, method, type, params=nil) { || ... }
click to toggle source
# File lib/cello/pageobjects/html_elements/logger.rb, line 7 def logger(name, method, type, params=nil) ts = Time.now # wait_element_helper name left = yield params = "NONE" if params.nil? #binding.pry puts " Element: #{name} Type: #{type} Method: #{method} Left #{left} Params: #{params} Code: #{yield} => #{(Time.now - ts).round 4} seconds" left end
wait_element_helper(name)
click to toggle source
# File lib/cello/pageobjects/html_elements/logger.rb, line 24 def wait_element_helper(name) timeout = 1 while !send("#{name}_exit_wait?") && time < timeout do sleep 0.1 time += 0.1 end end