This step definition involves entering a specific value into a designated field on the tested website, identified by its attribute.
When (I|we)* fill in "([^"]*)?" with "([^"]*)?" by( its)*( "([^"]*)?")* (attribute|attr)
This step is typically used when a specific input field needs to be filled with a particular value to trigger an event whose outcome depends on the entered value.
This field can be specified by id | class | name | placeholder for the field. It is possible to add or not add a sign “.” for class, and "#" for id.
Example by direct calling of ID, class:
When I fill in "#username" with "John Smith" by attribute
When we fill in ".username" with "John Smith" by attr
Or match any of the field attributes:
When I fill in "username" with "John Smith" by attr
When I fill in "username" with "John Smith" by its "name" attr
When we fill in "username" with "John Smith" by its "placeholder" attribute