Fill input fields

I.fill

Short form of I.fillField command

Fill a textual field.

This works for date picker fields that accept direct text input.

Usage

I.fill(field, value)

Parameters

ParameterTypeRemarks
fieldstring

Keyword to identify the field.
The associated label, aria-label, placeholder, adjacent text, and current value can be used to identify a field.
CSS selectors can also be used, but is not recommended as it makes the tests harder to keep up to date.

valuestringValue to fill into the field

Example(s)

Fill a field

I.fill("Email", "[email protected]");

This command fills "[email protected]" into the "Email" field.

Clear a field

// fill with empty value
I.fill("Email", "");

// or
I.clear("Email");

This command clears the "Email" field.

Last Updated: