Module: Watir::PerformanceHelper

Included in:
Browser
Defined in:
lib/watir-webdriver/extensions/performance.rb

Overview

Adds helper for window.performance to Watir::Browser.

This module is provided by an optional require:

require "watir-webdriver/extensions/performance"

Defined Under Namespace

Classes: Performance

Instance Method Summary collapse

Instance Method Details

#performanceObject



16
17
18
19
# File 'lib/watir-webdriver/extensions/performance.rb', line 16

def performance
  data = driver.execute_script("return window.performance || window.webkitPerformance || window.mozPerformance || window.msPerformance;")
  data && Performance.new(data)
end