TextFieldvariable
Call this InteractorConstructor to initialize a text field Interactor. The text field interactor can be used to interact with text
fields on the page and to assert on their state. A text field is any input
tag with a text-like interface, so input fields with e.g. email or number
types are also considered text fields, as is any input field with an unknown
type.
The text field is located by the text of its label.
Example
await TextField('Email').fillIn('jonas@example.com');
await TextField('Email').has({ value: 'jonas@example.com' });
await TextField({ id: 'email-field', 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 text field's current value.placeholder: string – Filter by the text field's placeholder attribute.valid: boolean – Filter by whether the text field is valid.disabled: boolean – Filter by whether the text field is disabled. Defaults tofalse.focused: boolean – Filter by whether the text field is focused. Seefocused.
Actions
click():Interaction– Click on the text fieldfocus():Interaction– Move focus to the text fieldblur():Interaction– Move focus away from the text fieldfillIn(value: string):Interaction– Fill in the text field with the given value. SeefillIn.