1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00

Fix example code in README.md

The console methods `console_messages` and `error_messages` each return
an array of messages.
This commit is contained in:
Ryunosuke SATO 2013-12-20 16:22:15 -05:00 committed by Joe Ferris
parent ce1b2366e1
commit 3f011c2684

View file

@ -91,14 +91,14 @@ console.log("hello")
```ruby
# In Ruby:
page.driver.console_messages
=> {:source=>"http://example.com", :line_number=>1, :message=>"hello"}
=> [{:source=>"http://example.com", :line_number=>1, :message=>"hello"}]
```
**error_messages**: returns an array of Javascript errors that occurred
```ruby
page.driver.error_messages
=> {:source=>"http://example.com", :line_number=>1, :message=>"SyntaxError: Parse error"}
=> [{:source=>"http://example.com", :line_number=>1, :message=>"SyntaxError: Parse error"}]
```
**alert_messages, confirm_messages, prompt_messages**: returns arrays of Javascript dialog messages for each dialog type