Class: Selenium::TextField
- Inherits:
-
Object
- Object
- Selenium::TextField
- Defined in:
- lib/selenium/text_field.rb
Instance Attribute Summary collapse
-
#browser ⇒ Object
readonly
Returns the value of attribute browser.
Instance Method Summary collapse
-
#initialize(browser, locator) ⇒ TextField
constructor
A new instance of TextField.
- #type(value) ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(browser, locator) ⇒ TextField
Returns a new instance of TextField.
5 6 7 8 |
# File 'lib/selenium/text_field.rb', line 5 def initialize(browser, locator) @browser = browser @locator = locator end |
Instance Attribute Details
#browser ⇒ Object (readonly)
Returns the value of attribute browser.
3 4 5 |
# File 'lib/selenium/text_field.rb', line 3 def browser @browser end |
Instance Method Details
#type(value) ⇒ Object
10 11 12 |
# File 'lib/selenium/text_field.rb', line 10 def type(value) @browser.type(@locator, value) end |
#value ⇒ Object
14 15 16 |
# File 'lib/selenium/text_field.rb', line 14 def value @browser.get_value(@locator) end |