tags:

views:

26

answers:

1

Hello. I`ve trouble on have a HTML document after onchange function by Nokogiri. Of course, Mechanize lib can control that. but, sadly webpage which I want to control is jsp not HTML.

Generated HTML showes as belows :

form method = "post" name = "mysearchform"

<select id = "hall_no" name = "hall_no" onchange = "document.mysearchform.submit()">
      <option value="1" selected=""> 1 </option>
      <option value="2"> 2 </option>
</select>

/form

I guess I POST some data by some command, but Im newbie to Ruby and I cant find any solution about that.

Is there anybody who`ve know about that?

A: 

You can't. Nokogiri is a HTML parser and can not execute javascript. Go for something like Capybara with a driver that supports javascript.

See http://github.com/jnicklas/capybara

balu