From: "Mattias A." Date: 2012-11-29T04:48:54+09:00 Subject: Page Objectt design with Selenium Watir-Webdriver Hi, I'm a newbie in both Ruby and Selenium watir-webdriver and want to ask you if you think below is a good design for my automation test? 1. I start my test through init.rb 2. In guide.rb i initialize @driver and let the user pick which tests he wants to run 3. Then i have placed the test for the "start page" in the class startpage.rb (i think thats what they mean with Page Object design?) init.rb require 'guide' guide = Guide.new guide.launch! guide.rb require 'watir-webdriver' class Guide def initialize @driver = Watir::Browser.new :firefox end def launch! @driver.goto "http://google.com" get_action do_action #returning method: verify_elements_present end def get_action #Get user input for the tests i want to run end def do_action #Start and run those test i picked in get_action methods end end startpage.rb require 'watir-webdriver' class Startpage def verify_elements_present #Verify that expected elements are present if @driver.find_element(:id, "q") puts "true" else puts "false" end end end def assert_all_text # Verify expected test are present end Best Regards Mattias -- Posted via http://www.ruby-forum.com/.