Table of Contents

Class SystemClock

Namespace
OpenQA.Selenium.Support.UI
Assembly
WebDriver.dll

Uses the system clock to calculate time for timeouts.

public class SystemClock : IClock
Inheritance
SystemClock
Implements
Inherited Members

Properties

Now

Gets the current date and time values.

public DateTime Now { get; }

Property Value

DateTime

Methods

IsNowBefore(DateTime)

Gets a value indicating whether the current date and time is before the specified date and time.

public bool IsNowBefore(DateTime otherDateTime)

Parameters

otherDateTime DateTime

The date and time values to compare the current date and time values to.

Returns

bool

true if the current date and time is before the specified date and time; otherwise, false.

LaterBy(TimeSpan)

Calculates the date and time values after a specific delay.

public DateTime LaterBy(TimeSpan delay)

Parameters

delay TimeSpan

The delay after to calculate.

Returns

DateTime

The future date and time values.