Class: Celerity::TableElement
- Celerity::Element
- Celerity::TableElement
Included Modules
Enumerable, Celerity::ClickableElement
Constants
- ATTRIBUTES
- BASE_ATTRIBUTES | CELLHALIGN_ATTRIBUTES | CELLVALIGN_ATTRIBUTES
- DEFAULT_HOW
- :id
Constants Inherited from Celerity::Element
BASE_ATTRIBUTES, CELLHALIGN_ATTRIBUTES, CELLVALIGN_ATTRIBUTES, HTML_401_TRANSITIONAL, TAGS, TO_S_SIZE
Constructor Summary
This class inherits a constructor from Celerity::Element.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Celerity::Element
Dynamically get element attributes.
[View source]
235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/celerity/element.rb', line 235 def method_missing(meth, *args, &blk) assert_exists meth = selector_to_attribute(meth) if self.class::ATTRIBUTES.include?(meth) || (self.class == Element && @object.hasAttribute(meth.to_s)) return @object.getAttribute(meth.to_s) end Log.warn "Element\#method_missing calling super with #{meth.inspect}" super end |
Public Visibility
Public Instance Method Summary
#[](index) | |
---|---|
#each | |
#length | |
#locate |
Public Instance Methods Inherited from Celerity::Element
assert_exists, attribute_string, attribute_value, exists?, fire_event, focus, methods, object, parent, respond_to?, text, to_s, to_xml, visible?, xpath
Public Instance Methods Included from Celerity::ClickableElement
click, click_and_attach, double_click, download, right_click
Public Instance Method Details
[]
public
[](index)
[View source]
14 15 16 17 |
# File 'lib/celerity/elements/table_elements.rb', line 14 def [](index) assert_exists TableRow.new(self, :object, @rows[index - Celerity.index_offset]) end |
each
public
each
[View source]
24 25 26 27 |
# File 'lib/celerity/elements/table_elements.rb', line 24 def each assert_exists @rows.each { |row| yield TableRow.new(self, :object, row) } end |
length
public
length
[View source]
19 20 21 22 |
# File 'lib/celerity/elements/table_elements.rb', line 19 def length assert_exists @object.getRows.length end |
locate
public
locate
[View source]
9 10 11 12 |
# File 'lib/celerity/elements/table_elements.rb', line 9 def locate super @rows = @object.getRows if @object end |