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:
parent
ce1b2366e1
commit
3f011c2684
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue