Class: Fluent::WebElements::UnorderedList
- Inherits:
-
WebElement
- Object
- WebElement
- Fluent::WebElements::UnorderedList
show all
- Includes:
- Enumerable
- Defined in:
- lib/fluent/web_elements/unordered_list.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) ⇒ UnorderedList
Returns a new instance of UnorderedList.
6
7
8
9
|
# File 'lib/fluent/web_elements/unordered_list.rb', line 6
def initialize(web_element, platform)
@web_element = web_element
include_platform_specifics_for platform
end
|
Instance Method Details
12
13
14
15
16
|
# File 'lib/fluent/web_elements/unordered_list.rb', line 12
def each
for index in 1..self.items do
yield self[index - 1]
end
end
|
22
23
24
25
26
27
28
|
# File 'lib/fluent/web_elements/unordered_list.rb', line 22
def include_platform_specifics_for(platform)
super
if platform[:platform] == :watir_webdriver
require 'fluent/platform_watir/platform_web_elements/unordered_list'
self.class.send :include, Fluent::Platforms::WatirWebDriver::UnorderedList
end
end
|
#list_item_xpath ⇒ Object
18
19
20
|
# File 'lib/fluent/web_elements/unordered_list.rb', line 18
def list_item_xpath
'.//child::li'
end
|