Praman — Agent-First SAP UI5 Test Automation Plugin - v1.3.5
    Preparing search index...

    Class Ui5Clock

    Controls the browser clock for date-driven SAP tests.

    Call install first — the other methods throw until you do, because Playwright silently ignores clock control on an uninstalled clock, which is a confusing way to lose an afternoon.

    ui5Clock.install

    const clock = new Ui5Clock({ page });
    await clock.install('2026-03-31T12:00:00Z');
    await clock.fastForward('30:00'); // 30 minutes later
    Index
    • Jumps forward, firing any timers scheduled in between.

      Parameters

      • ticks: string | number

        Milliseconds, or a "mm:ss" / "hh:mm:ss" string.

      Returns Promise<void>

      ui5Clock.fastForward

      await clock.fastForward('30:00'); // 30 minutes
      
    • Installs the fake clock, optionally at a specific time.

      Parameters

      • Optionaltime: ClockTime

        Initial time. Omit to install at the current real time.

      Returns Promise<void>

      Install before navigating where possible, so the application sees the faked time from its first render.

      PramanError with ERR_COMPAT_FEATURE_UNAVAILABLE when Playwright predates 1.45.

      ui5Clock.install

      await clock.install('2026-03-31T12:00:00Z');
      
    • Advances to a time, pausing there.

      Parameters

      • time: ClockTime

        The time to pause at.

      Returns Promise<void>

      ui5Clock.pauseAt

      await clock.pauseAt('2026-06-30T00:00:00Z'); // period close
      
    • Resumes normal time flow after a pause.

      Returns Promise<void>

      ui5Clock.resume

      await clock.resume();
      
    • Runs the clock forward, firing timers, without jumping.

      Parameters

      • ticks: string | number

        Milliseconds, or a "mm:ss" / "hh:mm:ss" string.

      Returns Promise<void>

      ui5Clock.runFor

      await clock.runFor(5_000);
      
    • Pins the clock to a fixed time without affecting timers.

      Parameters

      • time: ClockTime

        The time to report.

      Returns Promise<void>

      ui5Clock.setFixedTime

      await clock.setFixedTime('2026-12-31T23:59:00Z');