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

    Interface ScreencastFixture

    The screencast fixture API exposed to test bodies.

    All methods are safe to call even when page.screencast is not available in older Playwright versions — they degrade gracefully with a debug log.

    Provide structured video recording with AI-first frame streaming

    ui5.inspect

    test('purchase order', async ({ screencast }) => {
    await screencast.showChapter('Login');
    await screencast.showActions({ position: 'bottom' });
    screencast.onFrame(async (frame) => {
    await analyzeWithAI(frame.buffer);
    });
    });
    interface ScreencastFixture {
        onFrame: (handler: ScreencastFrameHandler) => void;
        showActions: (options?: ShowActionsOptions) => Promise<void>;
        showChapter: (title: string) => Promise<void>;
        showUI5ControlTree: (enabled?: boolean) => void;
    }
    Index

    Properties

    onFrame: (handler: ScreencastFrameHandler) => void

    Registers a handler called for every raw video frame.

    Type Declaration

    Handlers receive a ScreencastFrame with a JPEG buffer and a monotonic timestamp. Multiple handlers can be registered; they are called in registration order. Errors from handlers are caught and logged at debug level (non-fatal). Calling this method starts page.screencast.start({ onFrame }) if it has not been started yet.

    screencast.onFrame(async ({ buffer }) => {
    const analysis = await aiVision.analyze(buffer);
    if (analysis.anomaly) { throw new Error(analysis.reason); }
    });
    showActions: (options?: ShowActionsOptions) => Promise<void>

    Enables DOM action annotations in the video.

    Type Declaration

      • (options?: ShowActionsOptions): Promise<void>
      • Parameters

        • Optionaloptions: ShowActionsOptions

          Optional display configuration.

        Returns Promise<void>

        Promise that resolves once actions are enabled.

    Playwright 1.59+ only. Annotates click, fill, and keyboard events on the video frames. Uses the Playwright showActions() options object.

    await screencast.showActions({ position: 'bottom', duration: 800 });
    await page.getByRole('button', { name: 'Save' }).click();
    showChapter: (title: string) => Promise<void>

    Marks a new chapter in the video at the current timestamp.

    Type Declaration

      • (title: string): Promise<void>
      • Parameters

        • title: string

          Human-readable chapter title shown in the video overlay.

        Returns Promise<void>

        Promise that resolves once the chapter marker is applied.

    Chapters create labelled overlays in the video. Call at the start of each logical test section. Requires Playwright 1.59+ — silently no-ops on older versions.

    await screencast.showChapter('Open purchase order form');
    await page.goto('/fiori#PurchaseOrder-create');
    showUI5ControlTree: (enabled?: boolean) => void

    Enables or disables the UI5 control-tree overlay on video frames.

    Type Declaration

      • (enabled?: boolean): void
      • Parameters

        • Optionalenabled: boolean

          true to enable, false to disable (default).

        Returns void

    When enabled, records a flag that downstream frame handlers or a bridge extension can use to annotate each frame with the current UI5 control tree. Phase 1 implementation — overlay injection is handled by frame handlers.

    screencast.showUI5ControlTree(true);