views:

84

answers:

0

Hello! I try to access a form using mechanize (Ruby). On my form I have a gorup of Radiobuttons. So I want to check one of them.

I wrote:

target_form.radiobutton_with(:name => "radiobuttonname")[2].check

In this line I want to check the radiobutton with the value of 2. But in this line, I get an error:

: undefined method `radiobutton_with' for #<Nokogiri::XML::Element:0x9b86ea> (NoMethodError)

Any ideas why?