Class: Fluent::WebElements::TableRow
- Inherits:
-
WebElement
show all
- Includes:
- Enumerable
- Defined in:
- lib/fluent/web_elements/table_row.rb
Instance Attribute Summary
Attributes inherited from WebElement
#web_element
Instance Method Summary
collapse
Methods inherited from WebElement
#class_name, #click, #disabled?, #enabled?, #style, #text
Constructor Details
#initialize(web_element, platform) ⇒ TableRow
Returns a new instance of TableRow.
6
7
8
9
|
# File 'lib/fluent/web_elements/table_row.rb', line 6
def initialize(web_element, platform)
@web_element = web_element
include_platform_specifics_for platform
end
|
Instance Method Details
#cell_xpath ⇒ Object
22
23
24
|
# File 'lib/fluent/web_elements/table_row.rb', line 22
def cell_xpath
'.//child::td|th'
end
|
12
13
14
15
16
|
# File 'lib/fluent/web_elements/table_row.rb', line 12
def each
for index in 1..self.columns do
yield self[index - 1]
end
end
|
26
27
28
29
30
31
32
|
# File 'lib/fluent/web_elements/table_row.rb', line 26
def include_platform_specifics_for(platform)
super
if platform[:platform] == :watir_webdriver
require 'fluent/platform_watir/platform_web_elements/table_row'
self.class.send :include, Fluent::Platforms::WatirWebDriver::TableRow
end
end
|
#initialize_cell(row_element, platform) ⇒ Object
18
19
20
|
# File 'lib/fluent/web_elements/table_row.rb', line 18
def initialize_cell(row_element, platform)
::Fluent::WebElements::Cell.new(row_element, platform)
end
|