where was the send method placed in?

0 views
Skip to first unread message

bugs apple

unread,
Oct 8, 2008, 1:50:34 AM10/8/08
to watir-...@googlegroups.com
In the locator.rb for watir api, there is call that execute the element.send(@how) method like below,
but I fail to find the send method in element.rb,
 
anybody can tell where it is and which rb files?
 
 def locate
      object_index = 1
      @elements.each do |object|
        element = Element.new(object)
        if @types.include?(element.type)
          if @how == :index
            attribute = object_index
          else
            begin
             puts @how
              attribute = element.send(@how)
            rescue NoMethodError
              raise MissingWayOfFindingObjectException,
                "#{@how} is an unknown way of finding an <INPUT> element (#{@what})"
            end
          end
          if @what.matches(attribute)
            if @value
              if element.value == @value
                return object
              end
            else
              return object
            end
          end
          object_index += 1
        end
      end
      return nil
    end

Bret Pettichord

unread,
Oct 8, 2008, 10:35:53 AM10/8/08
to watir-...@googlegroups.com
"send" is a method on the Object class.

bugs apple wrote:
> In the locator.rb for watir api, there is call that execute the
> element.send(@how) method like below,
> but I fail to find the send method in element.rb,
>
> anybody can tell where it is and which rb files?
>
> def locate
> object_index = 1
> @elements.each do |object|
> element = Element.new(object)
> if @types.include?(element.type)
> if @how == :index
> attribute = object_index
> else
> begin
> puts @how
> attribute = element.send(@how)
> rescue NoMethodError
> raise MissingWayOfFindingObjectException,

> "#{@how <mailto:#%7B@how>} is an unknown way of
> finding an <INPUT> element (#{@what <mailto:#%7B@what>})"

bugs apple

unread,
Oct 8, 2008, 11:10:12 PM10/8/08
to watir-...@googlegroups.com
 

Thanks Bret,
 
could you tell me which and where the rb file is the Object class placed in?
 
 
 

 
2008/10/8 Bret Pettichord <br...@pettichord.com>

Željko Filipin

unread,
Oct 9, 2008, 11:13:41 AM10/9/08
to watir-...@googlegroups.com
On Thu, Oct 9, 2008 at 5:10 AM, bugs apple <appl...@gmail.com> wrote:
> could you tell me which and where the rb file is the Object class placed in?

Reply all
Reply to author
Forward
0 new messages