Let's face it, Ruby is slow , but don't abandon Ruby just yet. Using extensions, we can write performant code in another language for the specific slow functions while the rest of the application remains untouched.
The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, and can follow links and submit forms. Form fields can be populated and submitted.