|
You may be too bilingual; I see where alldocs is
initialized, but I don't see where todosdocs is initialized.
---Michael B. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rodrigo Julian Martin Sent: April 18, 2006 4:27 PM To: [email protected] Subject: Re: [Wtr-general] Method Names as variables? Hello Keith!
Thanks for the quick
answer, but I’m afraid that this is not what I’m looking
for… I have written a
function which search objects from a page, passing a propertie and a value as
parameters… This is the
function: def
ENRA_FindObjects(propertie, value)
$vector_fobjects=nil
$vector_fobjects=Array.new
j=0
alldocs=nil
alldocs=$browser.document.body.all
count=$browser.document.body.all.length
$vector_search=nil
$vector_search=Array.new for i in
0..count-1 do
if (todosdocs[i.to_s].”#{propertie}=="#{value}")
$vector_search[j]=todosdocs[i.to_s]
j+=1
end
end
return($vector_search) end So, I load a page with
a browser, and execute this function with, let’s
say: array_objects=ENRA_FindObjects(“className”,”button”) I hope the question is
more clear now… How can I write this
properly? à
todosdocs[i.to_s].”#{propertie}=="#{value}" , In order that the
propertie could be defined by a parameter? Thank you so much for
your time… Cheers Rodrigo Julian
Martin From: Keith
Lancaster [mailto:[EMAIL PROTECTED] I am assuming Item(80) in your
example is an object. Hello! _______________________________________________ |
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
