1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

The Page Class

By

Table of Contents

The Page class is class you'll be using most often. After any type of request is made, such as a GET or POST request from the Mechanize agent or "clicking" on a link, Mechanize will return a Page object.

The point of the Page object is to provide easy access to the links, forms and frames of the page returned by the server. It allows you to easily access a specific link, form, frame, etc. It's a small part of Mechanize, all of the heavy lifting is done by the Nokogiri HTML and XML parsing engine. In fact, to do some things, you'll be interacting directly with Nokogiri via the Page object.

  1. About.com
  2. Technology
  3. Ruby
  4. Tutorials
  5. The Mechanize 2.0 Handbook
  6. The Mechanize::Page Class

©2014 About.com. All rights reserved.