Class: Selenium::WebDriver::Remote::Bridge

Inherits:
Object
  • Object
show all
Defined in:
lib/selenium_statistics/bridge.rb

Instance Method Summary collapse

Instance Method Details

#execute(*args) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/selenium_statistics/bridge.rb', line 9

def execute(*args)
  command = args[0]

  start_time = Time.now
  begin
    return_value = webdriver_execute(*args)
    SeleniumStatistics.send("#{command}=", Time.now - start_time)
  rescue Exception => ex
    SeleniumStatistics.send("#{command}=", Time.now - start_time)
    raise
  end

  return_value
end

#webdriver_executeObject



7
# File 'lib/selenium_statistics/bridge.rb', line 7

alias_method :webdriver_execute, :execute