I'm switching from the Poltergeist to Cuprite driver for Capybara.
I have Javascript code which sets the message for a confirmation modal which I want to check in my feature specs.
The javascript is confirm("....").
With Poltergiest I could do page.driver.browser.modal_message.
This is unsupported by Cuprite, it there another way?
Capybaras
accept_confirm(which cuprite supports) returns the string from the system modal:Or you can pass a string to
accept_confirmto have it verify the string: