Check radio button with Behat

user2810744 picture user2810744 · Sep 24, 2013 · Viewed 8.7k times · Source

I'm stuck in this problem for 1 hour. It should be not difficult, actually, to check a radio button with Mink. How to do that, I have already found. But it works only when the radio button is inside of form tags. If I have

<table>
    <tr>
        <td>
            <input id="payone" type="radio" name="payment[method]" value="payone_today">
            <label for="payone">Vorkasse</label>
        </td>
    </tr>
</table>

There is no way to check the radio button, or I couldn't find it. Any ideas?

Answer

enkrates picture enkrates · Oct 20, 2013

I find that the 'When I select "value" from "name"' form works for selecting radio buttons. Perhaps your code would work with: When I select "payone_today" from "payment[method]".