lib/watir/non_control_elements.rb in watir-3.0.0.rc2 vs lib/watir/non_control_elements.rb in watir-3.0.0.rc3
- old
+ new
@@ -1,82 +1,114 @@
module Watir
+ class Area < Element
+ attr_ole :alt
+ attr_ole :type
+ attr_ole :href
+ end
- # this class contains items that are common between the span, div, and pre objects
- # it would not normally be used directly
- #
- # many of the methods available to this object are inherited from the Element class
- #
- class NonControlElement < Element
- include Watir::Exception
+ class Audio < Element
+ attr_ole :src
+ end
- def initialize(container, how, what)
- set_container container
- @how = how
- @what = what
- super nil
- end
+ class Base < Element
+ attr_ole :href
+ end
- # this method is used to populate the properties in the to_s method
- def span_div_string_creator
- n = []
- n << "class:".ljust(TO_S_SIZE) + self.class_name
- n << "text:".ljust(TO_S_SIZE) + self.text
- return n
- end
- private :span_div_string_creator
+ class Command < Element
+ attr_ole :disabled?
+ attr_ole :type
+ end
- # returns the properties of the object in a string
- # raises an ObjectNotFound exception if the object cannot be found
- def to_s
- assert_exists
- r = string_creator
- r += span_div_string_creator
- return r.join("\n")
- end
+ class Data < Element
+ attr_ole :value
end
- # Accesses Label element on the html page - http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/label.asp?frame=true
- class Label < NonControlElement
- # this method is used to populate the properties in the to_s method
- def label_string_creator
- n = []
- n << "for:".ljust(TO_S_SIZE) + self.for
- n << "text:".ljust(TO_S_SIZE) + self.text
- return n
- end
- private :label_string_creator
+ class Embed < Element
+ attr_ole :src
+ attr_ole :type
+ end
- # returns the properties of the object in a string
- # raises an ObjectNotFound exception if the object cannot be found
- def to_s
- assert_exists
- r = string_creator
- r += label_string_creator
- return r.join("\n")
- end
+ class FieldSet < Element
+ attr_ole :name
+ attr_ole :disabled?
end
- class Ins < NonControlElement
- Watir::Container.module_eval do
- remove_method :inss
+ class Font < Element
+ attr_ole :color
+ attr_ole :face
+ attr_ole :size
+ end
- def inses(how={}, what=nil)
- Inses.new(self, how, what)
- end
- end
+ class Keygen < Element
+ attr_ole :name
+ attr_ole :disabled?
end
- class FieldSet < NonControlElement
- Watir::Container.module_eval do
- alias_method :fieldset, :field_set
- alias_method :fieldsets, :field_sets
- end
+ class Label < Element
+ attr_ole :for, :htmlFor
end
- %w[Pre P Div Span Map Area Li Ul H1 H2 H3 H4 H5 H6
- Dl Dt Dd Strong Em Del Ol Body Meta Font Frameset].each do |elem|
- module_eval %Q{
- class #{elem} < NonControlElement; end
- }
+ class Li < Element
+ attr_ole :value
end
-
+
+ class Map < Element
+ attr_ole :name
+ end
+
+ class Menu < Element
+ attr_ole :type
+ end
+
+ class Meta < Element
+ attr_ole :http_equiv, :httpEquiv
+ attr_ole :content
+ attr_ole :name
+ end
+
+ class Meter < Element
+ attr_ole :value
+ end
+
+ class Object < Element
+ attr_ole :name
+ attr_ole :type
+ end
+
+ class Optgroup < Element
+ attr_ole :disabled?
+ end
+
+ class Output < Element
+ attr_ole :name
+ end
+
+ class Param < Element
+ attr_ole :name
+ attr_ole :value
+ end
+
+ class Progress < Element
+ attr_ole :value
+ end
+
+ class Script < Element
+ attr_ole :src
+ attr_ole :type
+ end
+
+ class Source < Element
+ attr_ole :type
+ end
+
+ class Style < Element
+ attr_ole :type
+ end
+
+ class Track < Element
+ attr_ole :src
+ end
+
+ class Video < Element
+ attr_ole :src
+ end
end