@raphox That should be fine, WebDriver will block your script until the process 
is shut down (eventually force killing it if a normal shutdown times out). It 
will also pick a random port for the phantomjs process if the default port is 
taken. I also this script (which does what you're describing) without any 
issues: 

```ruby
require 'selenium-webdriver'

300.times do
  Selenium::WebDriver.for(:phantomjs).quit
end
```

If that fails for you, you should open an issue in the [selenium-webdriver 
tracker](https://code.google.com/p/selenium/issues/entry). Memory leaks in 
phantomjs should be raised against the [phantomjs 
tracker](https://github.com/ariya/phantomjs/issues).

In any case, it's definitely not a fault in watir-webdriver, which does not 
treat phantomjs differently from any other browser.

---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/222#issuecomment-27780811
_______________________________________________
Wtr-development mailing list
Wtr-development@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to