Class DefaultPerformanceTiming
- All Implemented Interfaces:
PerformanceTiming
PerformanceTiming.
Via this implementation you can retrieve the W3C Performance Timing event values from the browser relative to
the value of the navigationStart attribute value, thus it won't return epoch values as querying the
corresponding Javascript attribute directly would, but rather handles navigationStart as zero and returns
time values passed since that point in time.
This implementation executes the query (window.performance.timing.) with a simple JavascriptExecutor
in a synchronous way.
If a query for a certain metric returns 0 it means it happened at the same moment (at least in epoch)
than navigationStart.
A query for a certain metrics returns a negative value if the event has not been registered on the page, or it is not feasible/valid for the given page/page load/redirect.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value for the argument event type.Return all timing metrics, in particular thewindow.performance.timingobject wrapped in aPerformanceTimingMetricsobject.Returns the value that corresponds to thesecureConnectionStartevent.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.fluentlenium.core.performance.PerformanceTiming
connectEnd, connectEnd, connectStart, connectStart, domainLookupEnd, domainLookupEnd, domainLookupStart, domainLookupStart, domComplete, domComplete, domContentLoadedEventEnd, domContentLoadedEventEnd, domContentLoadedEventStart, domContentLoadedEventStart, domInteractive, domInteractive, domLoading, domLoading, fetchStart, fetchStart, getEventValue, loadEventEnd, loadEventEnd, loadEventStart, loadEventStart, navigationStart, navigationStart, redirectEnd, redirectEnd, redirectStart, redirectStart, requestStart, requestStart, responseEnd, responseEnd, responseStart, responseStart, secureConnectionStart, unloadEventEnd, unloadEventEnd, unloadEventStart, unloadEventStart
-
Constructor Details
-
DefaultPerformanceTiming
public DefaultPerformanceTiming(org.openqa.selenium.WebDriver driver)
-
-
Method Details
-
getEventValue
Description copied from interface:PerformanceTimingReturns the value for the argument event type.- Specified by:
getEventValuein interfacePerformanceTiming- Parameters:
event- the event, never null- Returns:
- the event value
-
secureConnectionStart
Description copied from interface:PerformanceTimingReturns the value that corresponds to thesecureConnectionStartevent.- Specified by:
secureConnectionStartin interfacePerformanceTiming- Returns:
- the epoch time for the
secureConnectionStartevent
-
getMetrics
Description copied from interface:PerformanceTimingReturn all timing metrics, in particular thewindow.performance.timingobject wrapped in aPerformanceTimingMetricsobject.- Specified by:
getMetricsin interfacePerformanceTiming- Returns:
- the performance timing metrics
-