Module: Capybara::Apparition::Browser::Modal
- Included in:
- Capybara::Apparition::Browser
- Defined in:
- lib/capybara/apparition/browser/modal.rb
Instance Method Summary collapse
- #accept_alert ⇒ Object
- #accept_confirm ⇒ Object
- #accept_prompt(response) ⇒ Object
- #dismiss_confirm ⇒ Object
- #dismiss_prompt ⇒ Object
- #modal_message ⇒ Object
Instance Method Details
#accept_alert ⇒ Object
6 7 8 |
# File 'lib/capybara/apparition/browser/modal.rb', line 6 def accept_alert current_page.add_modal(alert: true) end |
#accept_confirm ⇒ Object
10 11 12 |
# File 'lib/capybara/apparition/browser/modal.rb', line 10 def accept_confirm current_page.add_modal(confirm: true) end |
#accept_prompt(response) ⇒ Object
18 19 20 |
# File 'lib/capybara/apparition/browser/modal.rb', line 18 def accept_prompt(response) current_page.add_modal(prompt: response) end |
#dismiss_confirm ⇒ Object
14 15 16 |
# File 'lib/capybara/apparition/browser/modal.rb', line 14 def dismiss_confirm current_page.add_modal(confirm: false) end |
#dismiss_prompt ⇒ Object
22 23 24 |
# File 'lib/capybara/apparition/browser/modal.rb', line 22 def dismiss_prompt current_page.add_modal(prompt: false) end |
#modal_message ⇒ Object
26 27 28 |
# File 'lib/capybara/apparition/browser/modal.rb', line 26 def current_page..shift end |