Class: Watir::Images
- Inherits:
 - 
      ElementCollections
      
        
- Object
 - ElementCollections
 - Watir::Images
 
 
- Defined in:
 - lib/watir/collections.rb
 
Overview
this class collects the images in the container An instance is returned by Watir::Container#images
Instance Method Summary collapse
- #element_class ⇒ Object
 - 
  
    
      #length  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
number of images browser.images.length.
 
Methods inherited from ElementCollections
#[], #each, #first, #get_length_of_input_objects, #initialize, #inspect, #last, #show, #to_s
Constructor Details
This class inherits a constructor from Watir::ElementCollections
Instance Method Details
#element_class ⇒ Object
      190  | 
    
      # File 'lib/watir/collections.rb', line 190 def element_class; Image; end  | 
  
#length ⇒ Object
number of images
browser.images.length
  
      193 194 195 196 197 198  | 
    
      # File 'lib/watir/collections.rb', line 193 def length all = @container.document.all imgs = [] all.each{|n| imgs << n if n.nodeName == "IMG"} imgs.length end  |