Thursday, June 28, 2007

SelectList object of WWW::Mechanize


require 'mechanize'

agent = WWW::Mechanize.new
agent.user_agent_alias = 'Windows IE 6'
page = agent.get('http://www.apple.com/')
form = page.forms[1]
select_list = form.field('worldwide')
p select_list

# WWW::Mechanize::SelectList


1 comment :

o_O said...

thank you :)
that was driving me crazy!