Class: Selenium::WebDriver::Alert
- Inherits:
-
Object
- Object
- Selenium::WebDriver::Alert
- Defined in:
- lib/selenium/webdriver/common/alert.rb
Instance Method Summary collapse
- #accept ⇒ Object
- #dismiss ⇒ Object
-
#initialize(bridge) ⇒ Alert
constructor
A new instance of Alert.
- #send_keys(keys) ⇒ Object
- #text ⇒ Object
Constructor Details
#initialize(bridge) ⇒ Alert
Returns a new instance of Alert.
24 25 26 27 28 29 |
# File 'lib/selenium/webdriver/common/alert.rb', line 24 def initialize(bridge) @bridge = bridge # fail fast if the alert doesn't exist bridge.getAlertText end |
Instance Method Details
#accept ⇒ Object
31 32 33 |
# File 'lib/selenium/webdriver/common/alert.rb', line 31 def accept @bridge.acceptAlert end |
#dismiss ⇒ Object
35 36 37 |
# File 'lib/selenium/webdriver/common/alert.rb', line 35 def dismiss @bridge.dismissAlert end |
#send_keys(keys) ⇒ Object
39 40 41 |
# File 'lib/selenium/webdriver/common/alert.rb', line 39 def send_keys(keys) @bridge.setAlertValue keys end |
#text ⇒ Object
43 44 45 |
# File 'lib/selenium/webdriver/common/alert.rb', line 43 def text @bridge.getAlertText end |