Praman — Agent-First SAP UI5 Test Automation Plugin - v1.2.0
    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();
    console.log(`${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>;
        toLocator(): Promise<Locator>;
    }
    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>

    • Converts this control proxy to a Playwright Locator via its DOM reference.

      Returns Promise<Locator>

      Playwright Locator pointing to the control's DOM element

      const button = await ui5.control({ controlType: 'sap.m.Button', properties: { text: 'Save' } });
      const locator = await button.toLocator();
      await expect(locator).toBeVisible();