Oscar is right I may have given you a tough example so I'll dumb it down, 
but it may not be dumbed down enough.

Simple ruby hash example:

Ref: google search: Ruby Class Hash  

myHash = { "userName" => "henry", "password"=>"thepw" }

In your form fill assume two text fields login and password

browser.text_field(:id,'login').set(myHash.fetch('userName').to_s)
browser.text_field(:id,'password').set(myHash.fetch('password').to_s)


Ruby simple assignment example to illustrate parameter as a field input

userName='Joe'
password = 'thePW'

browser.text_field(:id,'login').set(userName)
browser.text_field(:id,'password').set(password)



I use excel as the data load just because I can generate and maintain data 
quite easily, especially if I need to test some math or calculated 
relationships of data sets. 

Alternatives
use an array as data source  - google search ruby class array
use a database as data source - google search ruby class dbi
use a file as a data source - google search ruby class file
use a yaml file as a data source  
use an xml file as a data source


-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to