This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Page Modules
- Page Modules divide the Pages into groups of Elements
- Page Modules are suitable for Pages that have many Elements
- Filters can be created for an entire page-module
- Page Module make tests more cleaner and readable
Page Modules can be created like:
class PageName < ::Taza::Page
page_module :foo_module do
element(:first_element) { browser.text_field(:id => 'first_name') }
element(:second_element) { browser.text_field(:id => 'second_name') }
end
filter :foo_filter, :foo_module
def foo_filter
true
end
end
The example shows a page module “foo_module” that contains elements “first_element” and “second_element”. If the page module’s name is given to a filter, it will be for all the elements of the page module.
Another module on the same page can look like:
class PageName < ::Taza::Page
page_module :bar_module do
element(:first_element) { browser.text_field(:id => 'first_name') }
end
filter :bar_filter, :bar_module
def bar_filter
true
end
end
Elements inside the page-modules can be accessed like:
describe 'Some Page' do
describe 'Foo Module' do
SiteName.new do |site|
site.page_name(:foo_module) do |f|
f.first_element.set 'Foo'
end
end
end
describe 'Bar Module' do
SiteName.new do |site|
site.page_name(:bar_module) do |b|
b.first_element.set 'Bar'
end
end
end
end
Note: The elements on a page can have the same name only if the they belong to different Page Modules.







