123456789_123456789_123456789_123456789_123456789_

Class: Selenium::WebDriver::Alert

Relationships & Source Files
Inherits: Object
Defined in: rb/lib/selenium/webdriver/common/alert.rb

Class Method Summary

Instance Method Summary

Constructor Details

.new(bridge) ⇒ Alert

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/common/alert.rb', line 23

def initialize(bridge)
  @bridge = bridge

  # fail fast if the alert doesn't exist
  bridge.alert_text
end

Instance Method Details

#accept

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/common/alert.rb', line 30

def accept
  @bridge.accept_alert
end

#dismiss

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/common/alert.rb', line 34

def dismiss
  @bridge.dismiss_alert
end

#send_keys(keys)

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/common/alert.rb', line 38

def send_keys(keys)
  @bridge.alert = keys
end

#text

[ GitHub ]

  
# File 'rb/lib/selenium/webdriver/common/alert.rb', line 42

def text
  @bridge.alert_text
end