Variable TextFieldConst

TextField: any = TextFieldInteractor

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.

await TextField('Email').fillIn('jonas@example.com');
await TextField('Email').has({ value: 'jonas@example.com' });
await TextField({ id: 'email-field', disabled: true }).exists();
  • title: string – Filter by title
  • id: string – Filter by id
  • visible: boolean – Filter by visibility. Defaults to true. See isVisible.
  • 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 to false.
  • focused: boolean – Filter by whether the text field is focused. See focused.
  • click(): Interaction – Click on the text field
  • focus(): Interaction – Move focus to the text field
  • blur(): Interaction – Move focus away from the text field
  • fillIn(value: string): Interaction – Fill in the text field with the given value. See fillIn.