Select box with Webrat

I have a select box:

– Select Topic – Pollution

I would like to select the pollution option from the list using
webrat.

I’ve tried:

select “Pollution”, :from => “temp_aspect[topic_id]”
select “Pollution”

In both cases I receive the error:

The ‘Pollution’ option was not found

Any suggestions much appreciated,

Mike

2009/4/22 mikej [email protected]

I’ve tried:

select “Pollution”, :from => “temp_aspect[topic_id]”
select “Pollution”

you should select by the id attribute, not the name attribute, so:

select “Pollution”, :from => “temp_aspect_topic_id”

should work

– roovo

Thanks for the response. I think I tried that one, still get the
response:

The ‘Pollution’ option was not found in the “temp_aspect_topic_id”
select box (Webrat::NotFoundError)

Any more thought?

Mike

Thanks for the response. I think I tried that one, still get the
response:

The ‘Pollution’ option was not found in the “temp_aspect_topic_id”
select box (Webrat::NotFoundError)

Any more thought?

Mike

On Thu, Apr 23, 2009 at 4:34 AM, mikej [email protected] wrote:

Thanks for the response. I think I tried that one, still get the
response:

The ‘Pollution’ option was not found in the “temp_aspect_topic_id”
select box (Webrat::NotFoundError)

Any more thought?

Do you only have one select box on the page with that id (hidden or
showing, maybe new and/or edit forms) ?

Mike


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users


Zach D.
http://www.continuousthinking.com (personal)
http://www.mutuallyhuman.com (hire me)
@zachdennis (twitter)