Class: Selenium::WebDriver::Alert
- Inherits:
-
Object
- Object
- Selenium::WebDriver::Alert
- Defined in:
- lib/selenium/webdriver/common/alert.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
- #accept ⇒ Object
- #dismiss ⇒ Object
-
#initialize(bridge) ⇒ Alert
constructor
A new instance of Alert.
- #send_keys(keys) ⇒ Object
Constructor Details
#initialize(bridge) ⇒ Alert
Returns a new instance of Alert.
7 8 9 10 |
# File 'lib/selenium/webdriver/common/alert.rb', line 7 def initialize(bridge) @bridge = bridge @text = bridge.getAlertText end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
5 6 7 |
# File 'lib/selenium/webdriver/common/alert.rb', line 5 def text @text end |
Instance Method Details
#accept ⇒ Object
12 13 14 |
# File 'lib/selenium/webdriver/common/alert.rb', line 12 def accept @bridge.acceptAlert end |
#dismiss ⇒ Object
16 17 18 |
# File 'lib/selenium/webdriver/common/alert.rb', line 16 def dismiss @bridge.dismissAlert end |
#send_keys(keys) ⇒ Object
20 21 22 |
# File 'lib/selenium/webdriver/common/alert.rb', line 20 def send_keys(keys) @bridge.setAlertValue keys end |