Class: Watir::Locator

Inherits:
Object
  • Object
show all
Includes:
Watir, Exception
Defined in:
lib/watir/locator.rb

Direct Known Subclasses

InputElementLocator, TaggedElementLocator

Instance Method Summary collapse

Methods included from Watir

_register, _unregister, autoit, #dialog, until_with_timeout

Instance Method Details

#normalize_specifiers!(specifiers) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/watir/locator.rb', line 6

def normalize_specifiers!(specifiers)
  specifiers.each do |how, what|
    case how
    when :index
      what = what.to_i
    when :url
      how = :href
    when :class
      how = :class_name
    when :caption
      how = :value
    end

    @specifiers[how] = what
  end
end