Class: Selenium::Button
- Inherits:
-
Object
- Object
- Selenium::Button
- Defined in:
- lib/selenium/button.rb
Instance Attribute Summary collapse
-
#browser ⇒ Object
readonly
Returns the value of attribute browser.
Instance Method Summary collapse
- #click ⇒ Object
- #click_wait ⇒ Object
-
#initialize(browser, locator) ⇒ Button
constructor
A new instance of Button.
Constructor Details
#initialize(browser, locator) ⇒ Button
Returns a new instance of Button.
5 6 7 8 |
# File 'lib/selenium/button.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/button.rb', line 3 def browser @browser end |
Instance Method Details
#click ⇒ Object
10 11 12 |
# File 'lib/selenium/button.rb', line 10 def click browser.click(@locator) end |
#click_wait ⇒ Object
14 15 16 17 |
# File 'lib/selenium/button.rb', line 14 def click_wait click browser.wait_for_page_to_load end |