Class: WebViewer::ElementValueWriter
- Inherits:
-
Object
- Object
- WebViewer::ElementValueWriter
- Defined in:
- lib/element_value_writer.rb
Overview
ElementValueWriter assigns a value to a Selenium::WebDriver::Element. It uses the element_type parameter passed in the constructor to determine how to write to the element.
Instance Method Summary collapse
-
#initialize(web_element, element_type) ⇒ ElementValueWriter
constructor
A new instance of ElementValueWriter.
- #value=(new_value) ⇒ Object
Constructor Details
#initialize(web_element, element_type) ⇒ ElementValueWriter
Returns a new instance of ElementValueWriter.
7 8 9 10 |
# File 'lib/element_value_writer.rb', line 7 def initialize(web_element, element_type) @web_element = web_element @element_type = element_type end |
Instance Method Details
#value=(new_value) ⇒ Object
12 13 14 15 |
# File 'lib/element_value_writer.rb', line 12 def value=(new_value) # do smart things with element_type in here @web_element.value = new_value end |