Ok, I will try change:
```ruby
@browser.close
```
to:
```ruby
Selenium::WebDriver.for(:phantomjs).quit
```
And I also applied a exception handling:
```ruby
begin
@browser = Watir::Browser.new :phantomjs, :http_client => client
rescue Selenium::WebDriver::Error::WebDriverError => e
sleep 0.3
if _r = (_r || 0) + 1 and _r < 5
retry
else
raise e
end
end
```
Thanks @jarib
---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/issues/222#issuecomment-27783207
_______________________________________________
Wtr-development mailing list
Wtr-development@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-development