When I select radio button "value"

Selects (checks) a radio button on the current page. The quoted argument identifies the radio input and can be a CSS shorthand like #gender-male (id) or a class selector starting with ., the radio's value attribute, or its exact visible label text.

Lookup order: a # or . prefix is used as a CSS selector directly; otherwise the step first looks for an input[type="radio"] whose value matches, and only then falls back to an exact label match. Keep that in mind when a group has a value that happens to equal another option's label. Selecting a radio automatically deselects the others in the same group. If nothing matches, the step fails with hints to try value, label text, or an id / class selector.

Accepted phrasings

When I select radio button "item"
When we select radio button "item"
And I select radio button "item"

Examples

When I select radio button "Male"
When I select radio button "female"
When I select radio button "#gender-male"
When we select radio button "option1"

In a real scenario

Scenario: Block a user account from the people administration page
  Given I am logged in as an administrator
   When I go to "/admin/people"
    And wait
    And I click "Edit" in the "Normal user" row
    And wait
   Then I should see "Normal user"
   When I select radio button "Blocked"
    And I press the "Save" button
    And wait
   Then I should see "The changes have been saved."

Related steps

Back to Form Steps