When I fill in "value" for "field"

Fills a single input field with a value, using the reverse word order: the value comes first, then the field. It behaves exactly like fill in "field" with "value", so pick whichever reads better in your feature file. The second quoted argument is the field, located by its visible label, its placeholder text, or its name attribute - whichever matches first.

The step replaces any existing content in the field. If the field cannot be found by label, placeholder, or name, the step fails with a hint listing what it tried, so double-check the label text is exact (including capitalization).

Accepted phrasings

When I fill in "value" for "field"
When we fill in "value" for "field"
And I fill in "value" for "field"

Examples

When I fill in "jon-smith" for "Username"
When we fill in "Testing" for "Organization options"
And I fill in "1234" for "Password"

In a real scenario

Scenario: Check if a visitor can log in with a valid username and password
  Given I am on "/user/login"
    And I wait 6s
   When I fill in "Normal user" for "Username or email address"
    And I fill in "dD.123123ddd" for "Password"
    And I scroll to bottom
    And I press "Log in"
    And wait
   Then I should see "Normal user"

Related steps

Back to Form Steps