Allow no such alert error to be raised without any message
@@ -289,9 +289,8 @@ module Selenium
expect { alert.text }.to raise_error(Selenium::WebDriver::Error::NoSuchAlertError)
end
- # https://github.com/mozilla/geckodriver/issues/1404
- it 'raises NoAlertOpenError if no alert is present', except: {browser: :firefox} do
- expect { driver.switch_to.alert }.to raise_error(Selenium::WebDriver::Error::NoSuchAlertError, /alert|modal/i)
+ it 'raises NoAlertOpenError if no alert is present' do
+ expect { driver.switch_to.alert }.to raise_error(Selenium::WebDriver::Error::NoSuchAlertError)
end
# Safari - Raises wrong error
