Class: Fluent::WebElements::WebElement
- Inherits:
-
Object
- Object
- Fluent::WebElements::WebElement
show all
- Defined in:
- lib/fluent/web_elements/web_element.rb
Direct Known Subclasses
Button, Cell, CheckBox, Div, Form, Heading, Hidden, Image, Label, Link, ListItem, Option, OrderedList, Paragraph, Radio, SelectList, Span, Table, TableRow, TextArea, TextField, UnorderedList
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(web_element, platform) ⇒ WebElement
Returns a new instance of WebElement.
7
8
9
10
|
# File 'lib/fluent/web_elements/web_element.rb', line 7
def initialize(web_element, platform)
@web_element = web_element
include_platform_specifics_for platform
end
|
Instance Attribute Details
#web_element ⇒ Object
Returns the value of attribute web_element.
5
6
7
|
# File 'lib/fluent/web_elements/web_element.rb', line 5
def web_element
@web_element
end
|
Instance Method Details
#class_name ⇒ Object
32
33
34
|
# File 'lib/fluent/web_elements/web_element.rb', line 32
def class_name
attribute('class')
end
|
#click ⇒ Object
16
17
18
|
# File 'lib/fluent/web_elements/web_element.rb', line 16
def click
web_element.click
end
|
#disabled? ⇒ Boolean
24
25
26
|
# File 'lib/fluent/web_elements/web_element.rb', line 24
def disabled?
not enabled?
end
|
#enabled? ⇒ Boolean
20
21
22
|
# File 'lib/fluent/web_elements/web_element.rb', line 20
def enabled?
web_element.enabled?
end
|
36
37
38
39
40
41
|
# File 'lib/fluent/web_elements/web_element.rb', line 36
def include_platform_specifics_for(platform)
if platform[:platform] == :watir_webdriver
require 'fluent/platform_watir/platform_web_elements/web_element'
self.class.send :include, ::Fluent::Platforms::WatirWebDriver::WebElement
end
end
|
#style(property) ⇒ Object
28
29
30
|
# File 'lib/fluent/web_elements/web_element.rb', line 28
def style(property)
web_element.style property
end
|
#text ⇒ Object
12
13
14
|
# File 'lib/fluent/web_elements/web_element.rb', line 12
def text
web_element.text
end
|