Sha256: bde6bb853d81bba0f820b5961b120b5078eb9f001389448ee6422847a2b5d620

Contents?: true

Size: 631 Bytes

Versions: 24

Compression:

Stored size: 631 Bytes

Contents

# This is a generic HTML Element that is used to 
# locate all elements that share an attribute. The
# most common example would be finding elements that 
# all share the same class.
module Watir
  class HTMLElement < Element
    def initialize(container, how, what)
      set_container container
      @how = how
      @what = what
      if how == :index
        raise MissingWayOfFindingObjectException,
                    "#{self.class} does not support attribute #{@how}"
      end
      super nil
    end
    
    def locate
      @o = @container.locate_tagged_element('*', @how, @what)
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
watir-1.9.2 lib/watir/html_element.rb
watir-1.9.2.rc1 lib/watir/html_element.rb
watir-1.9.1 lib/watir/html_element.rb
watir-1.9.1.rc1 lib/watir/html_element.rb
watir-1.9.0 lib/watir/html_element.rb
watir-1.9.0.rc7 lib/watir/html_element.rb
watir-1.9.0.rc6 lib/watir/html_element.rb
watir-1.9.0.rc5 lib/watir/html_element.rb
watir-1.9.0.rc4 lib/watir/html_element.rb
watir-1.9.0.rc3 lib/watir/html_element.rb
watir-1.9.0.rc2 lib/watir/html_element.rb
watir-1.9.0.rc1 lib/watir/html_element.rb
watir-1.8.1 lib/watir/html_element.rb
watir-1.8.1.rc1 lib/watir/html_element.rb
watir-1.8.0 lib/watir/html_element.rb
watir-1.8.0.rc1 lib/watir/html_element.rb
watir-1.7.1 lib/watir/html_element.rb
watir-1.7.0 lib/watir/html_element.rb
watir-1.7.0.rc1 lib/watir/html_element.rb
watir-1.6.7 lib/watir/html_element.rb