lib/celerity/element_locator.rb in jarib-celerity-0.0.5.2 vs lib/celerity/element_locator.rb in jarib-celerity-0.0.5.4

- old
+ new

@@ -75,16 +75,16 @@ end def find_by_id(what) case what when Regexp - elements_by_tag_names.find { |elem| elem.getIdAttribute =~ what } + elements_by_tag_names.find { |elem| elem.getId =~ what } when String obj = @object.getHtmlElementById(what) return obj if @tags.include?(obj.getTagName) $stderr.puts "warning: multiple elements with identical id? (#{what.inspect})" if $VERBOSE - elements_by_tag_names.find { |elem| elem.getIdAttribute == what } + elements_by_tag_names.find { |elem| elem.getId == what } else raise TypeError, "expected String or Regexp, got #{what.inspect}:#{what.class}" end end