Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capybara-webkit raises Capybara::Driver::Webkit::WebkitInvalidResponseError

I got following message from webkit driver in my rspec:

Capybara::Driver::Webkit::WebkitInvalidResponseError:
Unable to load URL: http://127.0.0.1:44923/posts

Few days ago it worked. The problem is with save_page method. What could be wrong?

like image 225
Sławosz Avatar asked Jan 17 '12 10:01

Sławosz


2 Answers

I've had similar error messages when my page was raising an error. You should check manually that this is not the case by starting a server in testing mode (rails s -e test) and accessing the page yourself.

like image 184
Marc-André Lafortune Avatar answered Sep 30 '22 06:09

Marc-André Lafortune


Check if you don't have any other error in your application that could prevent Capybara from loading the page. Last time I got it, I realized that there was a 500 error page and that was why Capybara raised Capybara::Driver::Webkit::WebkitInvalidResponseError.

like image 41
Michał Czapko Avatar answered Sep 30 '22 06:09

Michał Czapko