Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make poltergeist able to show debug web inspector #432

Merged
merged 2 commits into from
Jan 30, 2018

Conversation

stardust66
Copy link
Contributor

@stardust66 stardust66 commented Jan 28, 2018

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.

In the opened browser page, click the bottom of the two links to get to a web inspector hooked up to the tests. Click the "console" tab to see any javascript errors. Click on the line number and you will be taken to the source javascript file with the line producing the error highlighted. Although, because of rails, all the javascript files are bundled into one giant file so it will take a while to load.

The inspector makes debugging the tests easier.

Context

Summary of Changes

  • Change Capybara's javascript driver to poltergeist with the option :inspector => true.

Screenshots

image

image

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.
@mi-wood mi-wood merged commit c614fc9 into RefugeRestrooms:develop Jan 30, 2018
@stardust66 stardust66 deleted the debug-tests branch January 30, 2018 02:35
DeeDeeG pushed a commit to DeeDeeG/refugerestrooms that referenced this pull request Oct 15, 2018
Make poltergeist able to show debug web inspector
DeeDeeG pushed a commit to DeeDeeG/refugerestrooms that referenced this pull request Nov 3, 2018
Make poltergeist able to show debug web inspector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants