module PageRecord::Finders
PageRecord
is a specific sort of {assertselenium.com/automation-design-practices/page-object-pattern/ PageObject pattern}. Where a “normal” {assertselenium.com/automation-design-practices/page-object-pattern/ PageObject} tries to make the page accessible with business like functions. We have taken a different approach. We’ve noticed that a lot of WebPage are mainly luxury CRUD pages. This means that almost every page shows one or more records of a certain type and has the ability to create, read update and delete one or more records. Sounds familiar? Yes, it is the same as an ActiveRecord pattern. So we tried to make accessing a page as close as possible to accessing an ActiveRecord.
To make this work, however, we need to add extra information to the HTML page. With HTML5, , you can do this easily. HTML-5 supports the data- attributes on any tag. We use these tags to identify the records on the page.
Public Class Methods
# File lib/page_record/finders.rb, line 19 def self.included(base) base.extend(ClassMethods) end