Class: Prickle::Capybara::Popups::Webkit

Inherits:
Object
  • Object
show all
Includes:
Capybara::DSL
Defined in:
lib/prickle/capybara/popup/webkit.rb

Instance Method Summary collapse

Instance Method Details

#accept(&block) ⇒ Object



18
19
20
21
# File 'lib/prickle/capybara/popup/webkit.rb', line 18

def accept &block
  set_type_to :alert
  manage_popup true, &block
end

#confirm(&block) ⇒ Object



8
9
10
11
# File 'lib/prickle/capybara/popup/webkit.rb', line 8

def confirm &block
  set_type_to :confirm
  manage_popup true, &block
end

#contains_message?(message) ⇒ Boolean

Returns:

  • (Boolean)

Raises:



27
28
29
# File 'lib/prickle/capybara/popup/webkit.rb', line 27

def contains_message? message
  raise Exceptions::MessageNotContainedInPopup.new(self.message) unless self.message.include? message
end

#dismiss(&block) ⇒ Object



13
14
15
16
# File 'lib/prickle/capybara/popup/webkit.rb', line 13

def dismiss &block
  set_type_to :confirm
  manage_popup false, &block
end

#messageObject



23
24
25
# File 'lib/prickle/capybara/popup/webkit.rb', line 23

def message
  @message
end