Permalink
Browse files

Fix example code in README.md

The console methods `console_messages` and `error_messages` each return
an array of messages.
  • Loading branch information...
1 parent ce1b236 commit 3f011c26841fe5d1dffe7e12000f9231f99a8df8 @tricknotes tricknotes committed with jferris Dec 20, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 README.md
View
@@ -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

0 comments on commit 3f011c2

Please sign in to comment.