Class BrowserClock

java.lang.Object
com.codeborne.selenide.BrowserClock

public class BrowserClock extends Object
Emulates the browser clock and timezone.

Uses CDP in Chromium browsers (Chrome, Edge), and WebDriver BiDi otherwise (e.g. Firefox).

The fixed-time emulation is applied to documents loaded after setFixedTime(Instant) (or setTimezone(String)) is called. To apply it to the current page, reload it after the call.

  • Method Details

    • setTimezone

      public void setTimezone(String timezoneId)
    • setFixedTime

      public void setFixedTime(Instant instant)
    • reset

      public void reset()