Skip to main content

Function: setAndValidateDate()

setAndValidateDate(page, controlId, date, options?): Promise<void>

Defined in: src/modules/date.ts:420

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.

options?​

DateOptions

Optional date operation settings.

Returns​

Promise<void>

Throws​

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

Example​

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