Hi, I'm new to Ruby and Mechanize and I'm making a script to update a
database based on the data scraped out of a website. This website is
badly coded and I don't have access to correct the issue, so I've been
having a lot of headaches because of it. My current issue is a select
tag with the selected attribute of the options. If I do a

  form.field_with(:name => 'my_select').value

 then the returned value is always the first value ignoring the selected
option. When I searched on the html code I see the selected option with
the attribute selected but with empty string, like so:

  <option value='my_value' selected=''>My Option</option>

I was wondering if there is a way to get all attributes from the option
node so I can look for the option that has the selected attribute even
if it's empty?

If this is a rookie question, please let me know, I've been searching
all over the web and can't find an explicit way.

Thanks

-- 
Posted via http://www.ruby-forum.com/.