Class: Selenium::WebDriver::Alert

Inherits:
Object
  • Object
show all
Defined in:
lib/selenium/webdriver/common/alert.rb

Instance Method Summary collapse

Constructor Details

#initialize(bridge) ⇒ Alert



5
6
7
# File 'lib/selenium/webdriver/common/alert.rb', line 5

def initialize(bridge)
  @bridge = bridge
end

Instance Method Details

#acceptObject



9
10
11
# File 'lib/selenium/webdriver/common/alert.rb', line 9

def accept
  @bridge.acceptAlert
end

#dismissObject



13
14
15
# File 'lib/selenium/webdriver/common/alert.rb', line 13

def dismiss
  @bridge.dismissAlert
end

#send_keys(keys) ⇒ Object



17
18
19
# File 'lib/selenium/webdriver/common/alert.rb', line 17

def send_keys(keys)
  @bridge.setAlertValue keys
end

#textObject



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

def text
  @bridge.getAlertText
end