Class: Selenium::Alert

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

Instance Method Summary collapse

Constructor Details

#initialize(webpage) ⇒ Alert

Returns a new instance of Alert.



3
4
5
# File 'lib/selenium/alert.rb', line 3

def initialize(webpage)
  @webpage = webpage
end

Instance Method Details

#messageObject



11
12
13
# File 'lib/selenium/alert.rb', line 11

def message
  @webpage.alert_message
end

#present?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/selenium/alert.rb', line 7

def present?
  @webpage.alert_present?
end