Class: Selenium::WebDriver::Alert

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

Instance Method Summary (collapse)

Constructor Details

- (Alert) initialize(bridge)



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

def initialize(bridge)
  @bridge = bridge
end

Instance Method Details

- (Object) accept



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

def accept
  @bridge.acceptAlert
end

- (Object) dismiss



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

def dismiss
  @bridge.dismissAlert
end

- (Object) send_keys(keys)



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

def send_keys(keys)
  @bridge.setAlertValue keys
end

- (Object) text



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

def text
  @bridge.getAlertText
end