Skip to content

Commit

Permalink
Make poltergeist able to show debug web inspector
Browse files Browse the repository at this point in the history
With the poltergeist_debug driver, you can now put 'page.driver.debug'
in the cucumber step definitions and capybara will pause when it gets
to the line and open a web inspector window of the tests in which you
can see the errors.
  • Loading branch information
stardust66 authored and DeeDeeG committed Oct 15, 2018
1 parent 2821dc5 commit 8024683
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion features/support/poltergeist.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist

Capybara.register_driver :poltergeist_debug do |app|
Capybara::Poltergeist::Driver.new(app, :inspector => true)
end

Capybara.javascript_driver = :poltergeist_debug

0 comments on commit 8024683

Please sign in to comment.