Read more

How to accept or deny JavaScript confirmation dialogs in Capybara/Selenium

Dominik Schöler
September 05, 2011Software engineer at makandra GmbH

These methods are available to you:

page.driver.browser.switch_to.alert.accept
page.driver.browser.switch_to.alert.dismiss
page.driver.browser.switch_to.alert.text # the confirmation text
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

Spreewald Show archive.org snapshot gives you steps like these:

When I confirm the browser dialog
When I cancel the browser dialog

Also see Type text into Javascript prompt dialogs in Capybara/Selenium.

Posted by Dominik Schöler to makandra dev (2011-09-05 16:43)