Fill an input field.
Can be used on date picker fields that accept direct text input.
| || ||Keyword to identify the field. |
The associated label, aria-label, placeholder, adjacent text, and current value can be used to identify a field.
CSS and XPATH selectors can also be used, but is not recommended as it makes the tests harder to keep up to date.
| || |
Value to fill into the field.
# Using field label
You can use the field's
name, and nearby text to identify the field.
This command fills "email@example.com" into field idenfied as "Email".
# Using field CSS / XPATH
You can also use CSS and XPATH to identify the field.
This command fills "firstname.lastname@example.org" into the input field with the CSS class
Use hard selectors like CSS / XPATH sparingly because it makes your tests fragile and harder to read and maintain.