In a Cucumber step, the following line will fill in the screen_name text box:
fill_in "user[screen_name]", :with => user.screen_name
but the following line will not
fill_in "Screen name:", :with => user.screen_name
Here is the text of the form:
<div class="form_row"> <label for="screen_name">Screen name:</label> <input id="user_screen_name" maxlength="20" name="user[screen_name]" size="20" type="text" /> </div>
Is this expected behavior? I would rather use the label value than the name value because the label value is easier to find out: I don't need to look at the source of the view.
Thanks.