[rspec-users] webrat cannot find label?

Mike Sassak msassak at gmail.com
Fri Nov 14 13:00:08 EST 2008


What happens if you remove the b and br tags from within the label and
change the text to "Legal Form" only, without the colon?

On Fri, Nov 14, 2008 at 12:32 PM, James Byrne <lists at ruby-forum.com> wrote:
> Bart Zonneveld wrote:
>> On 13-nov-2008, at 20:41, James B. Byrne wrote:
>
>>
>> Are you 100% sure the thing you are selecting exists in the select
>> box? That has bitten me in the butt a few times..
>>
>> cheers,
>> bartz
>
> This is what Rails generates from the view:
>
> <p>
> <label class="input_box" for="entity_entity_legal_form" title="Legal
> form is one of PERS, CORP or PART">
>  <b>Legal Form: </b><br />
> </label>
> <select id="entity_entity_legal_form" name="entity[entity_legal_form]">
>  <option value="">Select the type of entity</option>
>  <option value="CORP">CORP - Corporation</option>
>  <option value="PART">PART - Partnership</option>
>  <option value="PERS">PERS - Natural Person</option>
> </select>
> </p>
>
> So, it appears to me that the label and target ids match,
> "entity_entity_legal_form"; and the value that I am testing, "CORP" is
> available in the list of values.
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list