Class: Watir::ElementLocator

Inherits:
TaggedElementLocator show all
Defined in:
lib/watir/locator.rb

Overview

This is like the TaggedElementLocator but get all the elements by forcing @tag to be ‘*’

Instance Method Summary collapse

Methods inherited from TaggedElementLocator

#each_element, #locate, #match?, #set_specifier

Methods inherited from Locator

#match_with_specifiers?, #normalize_specifiers!

Methods included from Watir

_register, _unregister, autoit, #dialog, until_with_timeout

Constructor Details

#initialize(container) ⇒ ElementLocator

Returns a new instance of ElementLocator.



211
212
213
# File 'lib/watir/locator.rb', line 211

def initialize(container)
  @container = container
end

Instance Method Details

#eachObject



215
216
217
218
219
220
221
222
# File 'lib/watir/locator.rb', line 215

def each
  count = 0
  each_element('*') do |element| 
    next unless match_with_specifiers?(element)
    yield element          
  end 
  nil
end