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 (
Elements
Elements exist on Pages
An example of the search text field on the Google home page in WATIR syntax:
module Google
class HomePage < Taza::Page
element(:search_field) { browser.text_field(:name, 'q') }
end
end
This element can then be accessed like:
Google.new do |google|
google.home_page.search_field.set 'ruby'
#or
google.home_page do |hp|
hp.search_field.set 'ruby'
end
end
Since elements take blocks they can be more powerful than simply returning a value:
module Google
class SearchResultsPage < Taza::Page
element(:page_link) {|page_number| browser.link(:text,page_number.to_s) }
end
end
This element can then be accessed like:
Google.new do |google|
google.search_results_page.page_link(3).click
#or
google.search_results_page do |srp|
srp.page_link(3).click
end
end
Elements can also be divided into Page Modules for better readability.







