To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!More about adding a collaborator
Watir Page Helper
This is a ruby gem that assists in creating page model
abstractions for maintainable browser automation.
It provides helper methods to allow expressive and easy access to elements.
Simply define a page such as:
require 'watir-webdriver' require 'watir-page-helper' class MyPage include WatirPageHelper direct_url 'http://www.google.com' expected_element :text_field, :name => 'q' expected_title 'Google' text_field :search_box, :name => 'q' button :search, :name => 'btnG' def initialize browser, visit = false @browser = browser goto if visit expected_element if respond_to? :expected_element has_expected_title? if respond_to? :has_expected_title? end end
This page can now be used in rspec specs, cucumber features or in isolation
browser = Watir::Browser.new :chrome page = MyPage.new browser, true page.search_box = 'Watirmelon' #This method is created by WatirPageHelper page.search #This method is created by WatirPageHelper also browser.close
Last published almost 7 years ago by alisterscott.