Class: FireWatir::TableCell
- Defined in:
- lib/firewatir/elements/table_cell.rb
Overview
Description: Class for Table Cell.
Constant Summary
Constants inherited from Element
Element::FIRST_ORDERED_NODE_TYPE, Element::NUMBER_TYPE, Element::ORDERED_NODE_ITERATOR_TYPE, Element::TO_S_SIZE
Constants included from Container
Container::DEFAULT_HIGHLIGHT_COLOR, Container::MACHINE_IP
Instance Attribute Summary collapse
-
#element_name ⇒ Object
Returns the value of attribute element_name.
Instance Method Summary collapse
-
#colspan ⇒ Object
Description: Gets the col span of table cell.
-
#initialize(container, how, what) ⇒ TableCell
constructor
Description: Initializes the instance of table cell object.
-
#locate ⇒ Object
Description: Locate the table cell element on the page.
Methods inherited from Element
#assert_enabled, #assert_exists, #attribute_value, #click, #contains_text, #disabled, #document_var, #element_by_xpath, #element_type, #elements_by_xpath, #enabled?, #exists?, #fire_event, #inspect, #method_missing, #text, #visible?, #wait
Methods included from Container
#button, #cell, #checkbox, #dd, #dl, #dt, #file_field, #form, #frame, #hidden, #image, #link, #radio, #row, #select_list, #show_all_objects, #table, #text_field
Methods included from JsshSocket
#js_eval, #js_eval_method, #jssh_socket, #read_socket
Constructor Details
#initialize(container, how, what) ⇒ TableCell
Description:
Initializes the instance of table cell object.
Input:
- how - Attribute to identify the table cell element.
- what - Value of that attribute.
32 33 34 35 36 37 |
# File 'lib/firewatir/elements/table_cell.rb', line 32 def initialize(container, how, what) @how = how @what = what @container = container #super nil end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FireWatir::Element
Instance Attribute Details
#element_name ⇒ Object
Returns the value of attribute element_name.
7 8 9 |
# File 'lib/firewatir/elements/table_cell.rb', line 7 def element_name @element_name end |
Instance Method Details
#colspan ⇒ Object
Description:
Gets the col span of table cell.
Output:
Colspan of table cell.
48 49 50 51 |
# File 'lib/firewatir/elements/table_cell.rb', line 48 def colspan assert_exists @o.colSpan end |
#locate ⇒ Object
Description:
Locate the table cell element on the page.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/firewatir/elements/table_cell.rb', line 12 def locate case @how when :jssh_name @element_name = @what when :xpath @element_name = element_by_xpath(@container, @what) else @element_name = locate_tagged_element("TD", @how, @what) end @o = self end |