Module: Watir::CommonCollection

Included in:
Areas, Dds, Divs, Dls, Dts, Ems, HTMLElements, Labels, Links, Lis, Maps, Pres, Ps, SelectLists, Spans, Strongs, TableCells, TableRows, Tables
Defined in:
lib/watir/collections.rb

Overview

presumes element_class or element_tag is defined for subclasses of ElementCollections

Instance Method Summary collapse

Instance Method Details

#element_tagObject

:nodoc:all



8
9
10
# File 'lib/watir/collections.rb', line 8

def element_tag
  element_class::TAG
end

#lengthObject Also known as: size



12
13
14
# File 'lib/watir/collections.rb', line 12

def length
  @container.document.getElementsByTagName(element_tag).length
end