Class: Watir::TableCell
- Includes:
- Container, Exception
- Defined in:
- lib/watir/table.rb
Overview
this class is a table cell - when called via the Table object
Constant Summary
Constants inherited from Element
Instance Attribute Summary
Attributes included from Container
#activeObjectHighLightColor, #page_container, #type_keys, #typingspeed
Attributes inherited from Element
Instance Method Summary collapse
- #colspan ⇒ Object
- #document ⇒ Object
-
#initialize(container, how, what) ⇒ TableCell
constructor
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.
- #locate ⇒ Object
Methods included from Container
#area, #areas, #button, #buttons, #cell, #cells, #checkbox, #checkboxes, #dds, #divs, #dls, #dts, #element, #element_by_css, #elements, #ems, #file_field, #file_fields, #form, #forms, #frame, #frames, #hidden, #hiddens, #image, #images, #labels, #link, #links, #lis, #locate_all_elements, #locate_input_element, #locate_tagged_element, #log, #map, #maps, #modal_dialog, #popup, #pres, #ps, #radio, #radios, #row, #rows, #select_list, #select_lists, #set_container, #show_all_objects, #spans, #strongs, #table, #tables, #text_field, #text_fields, #wait
Methods inherited from Element
#<=>, #activeObjectHighLightColor, #after_text, #assert_enabled, #assert_exists, #attribute_value, #before_text, #click, #click!, #enabled?, #exists?, #fire_event, #flash, #focus, #inspect, #method_missing, #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
375 376 377 378 379 380 |
# File 'lib/watir/table.rb', line 375 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
#colspan ⇒ Object
395 396 397 398 |
# File 'lib/watir/table.rb', line 395 def colspan locate @o.colSpan end |
#document ⇒ Object
388 389 390 391 |
# File 'lib/watir/table.rb', line 388 def document locate return @o end |
#locate ⇒ Object
359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/watir/table.rb', line 359 def locate if @how == :xpath @o = @container.element_by_xpath(@what) elsif @how == :css @o = @container.element_by_css(@what) elsif @how == :ole_object @o = @what else @o = @container.locate_tagged_element("TD", @how, @what) end end |