Skip to content
This repository

Not closing browser when using capybara+selenium+guard+spork #144

Open
ulitiy opened this Issue September 30, 2011 · 2 comments

2 participants

Alexander Ulitin Tim Harper
Alexander Ulitin

Hello! I have no answer on stackoverflow, so asking the question here.
I'm using Mac OS X and capybara+selenium+guard+spork. First time the browser starts to make integration test with :js=>true in capybara and it's not closing. When specs run next time they hang and I need to close the browser manually and restart all the specs. That happens only when I use spork. Without spork - browser is closed correctly. Specifying path gives no results.
Could you help me with this problem?

Tim Harper
Owner
Alexander Ulitin

I've made some kind of dirty workaround:
1) [optional] to close only my processes
cp /Applications/Firefox.app/Contents/MacOS/firefox-bin /Applications/Firefox.app/Contents/MacOS/firefox-bin-selenium
Selenium::WebDriver::Firefox.path = "/Applications/Firefox.app/Contents/MacOS/firefox-bin-selenium"
2)
Spork.each_run do
`killall firefox-bin-selenium`
end

Even if I get all the code from prefork to each_run it doesn't work.
I don't have enough skills to find more smart solution. And it seems, that at_exit has a bug in the ruby 1.9 itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.