# Cucumber: fill\_in does not take label

**URL:** <https://www.ruby-forum.com/t/cucumber-fill-in-does-not-take-label/182562>\
**Category:** Rails\
**Created:** [January 29, 2010, 10:11pm UTC](https://www.ruby-forum.com/t/cucumber-fill-in-does-not-take-label/182562 "2010-01-29T22:11:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Learn\_by\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e274bd/32.png) [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Post date:** [January 29, 2010, 10:11pm UTC](https://www.ruby-forum.com/t/cucumber-fill-in-does-not-take-label/182562/1 "2010-01-29T22:11:48Z")

</div>

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:

 Screen name: 

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.
