At 12:53 PM 10/27/2005, beth ferguson wrote:
>i've been trying to write a function which dynamically finds all the
>html elements on the page and then fills the form based on the found
>html elements.
>
>So, in compete psuedo-code, i'd like to do something like
>every field in pageObject do
> if field is textfield then
> get the name
> generate a value
> fill the field
> elsif field is button then
> / if submit then submit
> end
>end.
[...]
>If am able to make this function I will be less tied to the particulars
>of the gui, name, etc. Can anyone help me figure out what's wrong with
>the above function or having already approached this problem, suggest to
>me another angle.
Something like this?
ie.text_fields.each {|tf| tf.value = tf.name.reverse}
ie.form(:index, 1).submit
This enters the reversed name as the value of each text field (surely you
have a smarter idea for this). And then clicks the first submit button.
_____________________
Bret Pettichord
www.pettichord.com
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general