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
gives you steps like these:
When I confirm the browser dialog When I cancel the browser dialog
Flaky tests are tests that sometimes fail for no obvious reason. They are the plague of many end-to-end (E2E) test suites that automate the browser through tools like Capybara and Selenium.
Join our free training event and learn to fix any flaky test suite, even in large legacy applications.