I figured it out, here it is for those interested:
$ie.select_lists.each {|sb| sb.select_value(/^M(PT|DT)/)}
--Mark
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cain, Mark
Sent: Friday, October 28, 2005 10:41 AM
To: [email protected]
Subject: Re: [Wtr-general] dynamically discover page
Would this also work?:
ie.selectBox.each {|sb| sb.select_value = /MDT|MPT/}
--Mark
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bret Pettichord
Sent: Thursday, October 27, 2005 10:09 PM
To: [email protected]; beth ferguson
Cc: [email protected]
Subject: Re: [Wtr-general] dynamically discover page
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
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general