On Thu, Dec 10, 2009 at 10:59 PM, bender25 <[email protected]> wrote:
> Do you know how to keep these nil entries out of the image collection?

expand_images_and_nils = browser.images.collect do |image|
  image if image.alt =~ /^expand/
end

expand_images = expand_images_and_nils.compact

More information:

http://www.ruby-doc.org/core/classes/Array.html#M002216

Željko

-- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general

Reply via email to