j.
On 11/9/05, Jeff Wood <[EMAIL PROTECTED]> wrote:
Ah, images takes NO input parameters.
So, you can only get the collection. then iterate them.
So, to do what you want ... you would have to do something like:
ie.images.select { |curr| curr.src =~ /add] }[2].click
...
j.On 11/9/05, Jeff Wood < [EMAIL PROTECTED]> wrote:Interesting, in my testing
ie.images[1]
ie.images[2]
work fine, but if you add any selection criteria, you can't do the indexing.
.images is the correct thing to call.
we'll have to check with bret.
j.--
On 11/9/05, Torres, Ben (HQP) <[EMAIL PROTECTED] > wrote:I tried this:
ie.images(:src, /add/)[2].click
But got this error, "C:/watir/CRIScripts/test.rb:22:in `images': wrong
number of arguments (2 for 0)(ArgumentError)"
I tried using image instead of images:
ie.image(:src, /add/)[2].click
But got this error, "C:/watir/CRIScripts/test.rb:22: undefined method
`[]' for #<Watir::Image:0x2ae43e0> (NoMethodError)"
Is my syntax correct?
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org "
Jeff Wood
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
