diff --git a/lib/capybara/webkit/browser.rb b/lib/capybara/webkit/browser.rb index 4b34b8f..f282466 100644 --- a/lib/capybara/webkit/browser.rb +++ b/lib/capybara/webkit/browser.rb @@ -51,7 +51,7 @@ module Capybara::Webkit end def alert_messages - command("JavascriptAlertMessages").split("\n") + JSON.parse(command("JavascriptAlertMessages")) end def confirm_messages diff --git a/spec/driver_spec.rb b/spec/driver_spec.rb index ff6f58a..a15cf32 100644 --- a/spec/driver_spec.rb +++ b/spec/driver_spec.rb @@ -537,7 +537,7 @@ describe Capybara::Webkit::Driver do