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

    Function setAndValidateDate

    • Ai

      Sets a date and validates that the control does not enter an error state.

      Parameters

      • page: DatePage

        Playwright Page (or compatible subset).

      • controlId: string

        The ID of the DatePicker control.

      • date: DateInput

        The date to set.

      • Optionaloptions: DateOptions

        Optional date operation settings.

      Returns Promise<void>

      ui5.date.setAndValidate

      Set a date and verify the control does not show a validation error.

      On success, the date is set and the control's valueState is not 'Error'.

      Combines setDatePickerValue() with a valueState check. Throws if the date is outside the allowed range (minDate/maxDate) or format is invalid.

      sap.m.DatePicker — setValue(), getValueState()

      Safely set dates with validation in SAP forms (e.g., fiscal period constraints).

      ControlError if the control enters an error value state after setting.

      await setAndValidateDate(page, 'datePicker1', '2024-01-15');