While testing a feature that requires a confirmation, you may have seen a:
There are two different ways to accept the confirm alert in an acceptance/feature spec:
- Access driver itself, sometime after the dialog is expected to appear:
- Wrap your click event in an
page.accept_confirm do page.find(delete_btn).click end
Hopefully this helps, Happy coding!