rubyonrailsin

A Ruby and Rails talk

Wednesday, March 24, 2010


[Rails] Mechanize

by rubyonrailsin 0 comments

Tag


Share this post:
Design Float
StumbleUpon
Reddit

Hi

I am trying to submit an asp form using Mechanize.

I have to parse this site  in order to get the results http://www.vitranexpress.com/home/CombinedHome.aspx

So for this I have to log in the site which I was successful using Mechanize. Once you logged in you have to select the Link "Rate Quoter". Again using mechanize I got the page that this link pointed to. There is a form which I need to submit to get the shipping charges.

To submit that you need to enter the destination zip code. With actual site when you enter the destination zip code it passes an ajax request to the server and returns the area matching the zip code.

Once that is done you enter the weight and class.

With mechanize I was able to set the destination zip code, weight and class. But when I try to submit it returns me the same form every time.

I searched the net for help. I found that the asp.net uses a field "__EVENTTARGET" to be set to submit  a form. I tried doing that too but it didn't worked.

I would like to know how do I do this.

Thank you,
Nirav  

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment

Subscribe feeds via e-mail

Blog Archive