Class: Watir::TableCell

Inherits:
Element show all
Includes:
Container, Exception
Defined in:
lib/watir/table.rb

Overview

this class is a table cell - when called via the Table object

Constant Summary collapse

TAG =
"TD"

Constants inherited from Element

Element::TO_S_SIZE

Instance Attribute Summary

Attributes included from Container

#activeObjectHighLightColor, #page_container, #type_keys, #typingspeed

Attributes inherited from Element

#container

Instance Method Summary collapse

Methods included from Container

#input_element_locator, #locator_for, #log, #set_container, #show_all_objects, #tagged_element_locator, #wait

Methods inherited from Element

#<=>, #activeObjectHighLightColor, #after_text, #assert_enabled, #assert_exists, #attribute_value, #before_text, #click, #click!, #create_event, #dispatch_event, #enabled?, #exists?, #fire_event, #flash, #focus, inherited, #inspect, #locate, #method_missing, #name, #ole_object, #ole_object=, #parent, #text, #type_keys, #typingspeed, #visible?

Constructor Details

#initialize(container, how, what) ⇒ TableCell

Returns an initialized instance of a table cell

* container  - an  IE object
* how        - symbol - how we access the cell
* what       - what we use to access the cell - id, name index etc


366
367
368
369
370
371
# File 'lib/watir/table.rb', line 366

def initialize(container, how, what)
  set_container container
  @how = how
  @what = what
  super nil
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Watir::Element

Instance Method Details

#__ole_inner_elementsObject



373
374
375
376
# File 'lib/watir/table.rb', line 373

def __ole_inner_elements
  locate
  return @o.all
end

#colspanObject



385
386
387
388
# File 'lib/watir/table.rb', line 385

def colspan
  locate
  @o.colSpan
end

#documentObject



378
379
380
381
# File 'lib/watir/table.rb', line 378

def document
  locate
  return @o
end