DateFieldvariable
Call this InteractorConstructor to initialize a date field Interactor. The date field interactor can be used to interact with date
fields on the page and to assert on their state. A date field is the date type input
tag with a text-like interface.
The date field is located by the text of its label.
Example
await DateField('Date of birth').fillIn('2012-06-13');
await DateField('Date of birth').has({ value: '2014-08-18' });
await DateField({ id: 'birth-date', disabled: true }).exists();
Filters
title: string – Filter by titleid: string – Filter by idvisible: boolean – Filter by visibility. Defaults totrue. SeeisVisible.value: string – Filter by the date field's current value in ISO format.date: Date | null – Filter by the date field's current value as date.timestamp: number – Filter by the date field's current value as timestamp.placeholder: string – Filter by the date field's placeholder attribute.valid: boolean – Filter by whether the date field is valid.disabled: boolean – Filter by whether the date field is disabled. Defaults tofalse.focused: boolean – Filter by whether the date field is focused. Seefocused.
Actions
click():Interaction– Click on the date fieldfocus():Interaction– Move focus to the date fieldblur():Interaction– Move focus away from the date fieldfillIn(value: string):Interaction– Fill in the date field with the given value. SeefillIn.