Select box with Webrat


#1

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


#2

2009/4/22 mikej removed_email_address@domain.invalid

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


#3

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


#4

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


#5

On Thu, Apr 23, 2009 at 4:34 AM, mikej removed_email_address@domain.invalid 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
removed_email_address@domain.invalid
http://rubyforge.org/mailman/listinfo/rspec-users


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