Praman — AI-First SAP UI5 Test Automation Platform - v1.0.1
    Preparing search index...

    Interface UI5ControlBase

    Base interface all UI5 controls extend.

    Maps to sap.ui.core.Element / sap.ui.core.Control base methods. All methods return Promise<T> because they execute via the bridge adapter in the browser context.

    import type { UI5ControlBase } from '#core/types/controls.js';

    async function logControl(control: UI5ControlBase): Promise<void> {
    const id = await control.getId();
    const type = await control.getControlType();
    logger.info(`${type}#${id}`);
    }
    interface UI5ControlBase {
        controlType: string;
        id: string;
        getAggregation(name: string): Promise<readonly UI5ControlBase[]>;
        getBindingInfo(name: string): Promise<unknown>;
        getControlType(): Promise<string>;
        getDomRef(): Promise<Element | null>;
        getId(): Promise<string>;
        getModel(name?: string): Promise<unknown>;
        getProperty(name: string): Promise<unknown>;
        getVisible(): Promise<boolean>;
        isBound(propertyName: string): Promise<boolean>;
        setProperty(name: string, value: unknown): Promise<void>;
        [method: string]: any;
    }

    Indexable

    • [method: string]: any

      Dynamic method access — the proxy forwards any UI5 method call to the bridge.

      UI5 controls have hundreds of methods (getters, setters, actions) that vary by control type. The runtime Proxy intercepts property access and routes it through page.evaluate(). This index signature allows TypeScript to accept any method call without requiring explicit type narrowing.

      any is required here because the Proxy returns heterogeneous types per property: string for id/controlType, undefined for anti-thenable, and (...args) => Promise for dynamic methods. No single non-any type can express this while remaining compatible with the typed members above.

      const button = await ui5.control({ id: 'btn1' });
      await button.press(); // sap.m.Button method
      await button.getText(); // sap.m.Button method
      const table = await ui5.control({ id: 'tbl1' });
      const rows = await table.getRows(); // sap.ui.table.Table method
    Index

    Properties

    controlType: string

    Fully qualified control type, e.g., 'sap.m.Button'.

    id: string

    Control ID assigned in the UI5 view or generated.

    Methods

    • Returns binding info for a named property.

      Parameters

      • name: string

      Returns Promise<unknown>

    • Returns the fully qualified control type name.

      Returns Promise<string>

      Praman proxy convenience — equivalent to getMetadata().getName() in native UI5.

    • Returns the DOM reference element, or null if not rendered.

      Returns Promise<Element | null>

    • Returns the named model, or the default model if no name given.

      Parameters

      • Optionalname: string

      Returns Promise<unknown>

    • Gets a named property value.

      Parameters

      • name: string

      Returns Promise<unknown>

    • Returns whether the control is visible (getVisible() on sap.ui.core.Control).

      Returns Promise<boolean>

    • Returns whether a property is data-bound.

      Parameters

      • propertyName: string

      Returns Promise<boolean>

    • Sets a named property value.

      Parameters

      • name: string
      • value: unknown

      Returns Promise<void>