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

    Function waitForControlState

    • Waits until a specific control satisfies a predicate.

      Parameters

      • locator: Locator

        Locator for the control.

      • predicate: ControlPredicate

        Browser-side predicate receiving the control's element.

      • Optionaloptions: WaitForControlStateOptions

        Timeout and message overrides.

      Returns Promise<ControlWaitResult>

      Which strategy satisfied the wait.

      On Playwright 1.62+ the predicate receives the control's DOM element directly. Below that it runs page-scoped against the element resolved from the control id, which is equivalent but slightly less precise if the id changes mid-wait.

      Controls are resolved with sap/ui/core/Element.closestTo() rather than the deprecated sap.ui.getCore().byId(), so this adds no new praman/no-deprecated-ui5-globals findings.

      TimeoutError when the predicate does not become true in time.

      ui5Wait.forControlState

      await waitForControlState(
      table,
      (el) => !el.classList.contains('sapUiLocalBusy'),
      { timeout: 20_000 },
      );