1
0
Fork 0
mirror of https://github.com/teampoltergeist/poltergeist.git synced 2022-11-09 12:05:00 -05:00

Clarify how to enable the debug mode in the readme

I would like to clarify how to enable the debug mode.
At first was adding a :inspector => true meta tag to my examples.
I've found the answer in this issue
https://github.com/jonleighton/poltergeist/issues/47

At least one person more made the same mistake, so maybe its useful.
This commit is contained in:
Miguel Camba 2013-03-22 21:16:48 +01:00
parent 9645b52009
commit 12040345af

View file

@ -138,6 +138,18 @@ When this option is enabled, you can insert `page.driver.debug` into
your tests to pause the test and launch a browser which gives you the
WebKit inspector to view your test run with.
You can register this debugger driver with a different name and set it
as the current javascript driver. By example, in your herlper file:
```ruby
Capybara.register_driver :poltergeist_debug do |app|
Capybara::Poltergeist::Driver.new(app, :inspector => true)
end
# Capybara.javascript_driver = :poltergeist
Capybara.javascript_driver = :poltergeist_debug
```
[Read more
here](http://jonathanleighton.com/articles/2012/poltergeist-0-6-0/)