Hola,

Just downloaded Watir yesterday and am pretty excited to be using 
it--thanks developers!

I don't know if anybody has already done this, but I'm slowly hacking 
together some classes to help me out with testing to let me write code 
like the following:

class Page0 < WatirPage
  has_text 'fname'
  has_text 'lname'
  has_select 'desired_effective_date_year'
  has_select 'desired_effective_date_day'
  has_select 'desired_effective_date_month'
  has_select 'current_insurance'
  has_select 'num_household'
  has_radio_group 'three_year_requirement', 'Y', 'N'
  has_radio_group 'previous_w_njcure', 'Y', 'N'
  has_radio_group 'reside_w_njcure', 'Y', 'N'
end

page0 = Page0.new
page0.fname = 'Dave'
page0.lname = 'Newton'
page0.desired_effective_date_year = "2006"
page0.desired_effective_date_day = "15"
page0.desired_effective_date_month = "Oct"
page0.current_insurance = 'Yes.'
page0.three_year_requirement = 'N'
page0.previous_w_us = 'N'
page0.reside_w_us = 'Y'
page0.form_set($ie)

that pretty much does what you would expect.

<caveats>
I don't have the "create class from web page" done yet (probably not 
until Thursday), the code is tweaky (relatively new to Ruby, and code 
only 2 hrs old :), it might not work the way people might want it to, etc.
</caveats>

Anybody interested?

Dave


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to