public
Description: An opinionated browser-based test framework
Home | Edit | New

Partials

Partials are good for when you’ve got headers, footers, or other common areas of a page repeated on multiple pages. Partials are Pages that do not follow the FooPage naming convention and live in ./lib/site_name/pages/partials

$ ./script/generate partial header google will generate a partial for the Google site and can be accessed as follows given the following partial code

module Google
  class Header < ::Taza::Page
    element(:sign_in_link) { browser.link(:text,'Sign in') }
  end
end
Google.new do |g|
  g.header.sign_in_link.click
end

Last edited by scudco, Wed Dec 03 23:02:14 -0800 2008
Home | Edit | New
Versions: