On Sat, Nov 14, 2009 at 4:38 PM, lsiden <
lsi...@gmail.com> wrote:
> The placeholder names are the same as the field names, so there is no
> need to guess if I can find a way to access the placeholder name.
> Otherwise, I will have to type 20 nearly identical steps definitions.
> Guess I'll get started now, and use your answer, if I can, another
> time.
>
Hi Larry,
Do you mean the placeholder in a Scenario Outline step? If that's the
case, then you can write a step in your scenario outline like:
Given I fill in "<placeholder>" with "<value>"
which should use the values from the examples table for placeholder
and value, and match the Webrat step definition.
Mike
> On Nov 14, 3:52 pm, aslak hellesoy <
aslak.helle...@gmail.com> wrote:
>> > Aslak, in a step definition, is it possible for me to access the placeholder
>> > name?
>>
>> > For example, in pseudo-code:
>>
>> >> Given /^I type in "([^"]*)",$/ do |value|
>> >> fill_in <placeholder_name>, :with => value
>> >> end
>>
>> > Here, the placeholder_name is also the name of the field I want to fill in.
>>
>> I don't think I understand the question. You want Cucumber to guess
>> what text field you're typing into?
>>
>> Aslak
>>
>> > Thank you,
>>
>> P.S. No need to email me directly or address questions to me
>> personally - I'm subscribed to the cukes list along with 500 other
>> people, and many of them can answer questions too ;-)
>>
>> > Larry Siden
>> >
http://umich.edu/~lsiden
>> >
734-926-9614
>> > skype: lsiden
>
> --
>
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to
cu...@googlegroups.com.
> To unsubscribe from this group, send email to
cukes+un...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/cukes?hl=.
>
>
>