I found several answers to this, but they all require getting the alert text and catching an exception. How to avoid this clunky solution?
Is there another way to check if an alert is present?
Using Rails, Capybara, Selenium Webdriver and ChromeDriver helper.