small medium large xlarge

10 Feb 2013, 06:07
Michael Allan (2 posts)

I’ve added the save_and_open_page as an After hook as per page 151, but the browser opens the saved page incorrectly. Rather than opening, eg.


… it opens this instead:


… which of course doesn’t exist.

I’m using rvm and bundler on Mac OS X 10.6.8, with Safari set as my default browser. I’m also using slightly different gem versions that those specified, ie. the ones current as of today per this Gemfile:

source :rubygems

gem 'sinatra', '1.3.4'

group :development do
  gem 'rspec', '2.0.1'
  gem 'cucumber', '1.2.1'
  gem 'capybara', '2.0.2'
  gem 'launchy', '2.2.0'

Apologies if this is a silly question, but I’ve not had any luck googling for an answer. Thanks for any suggestions, and I’m really enjoying the book :-)

21 Jun 2013, 12:43
Chris Parsons (1 post)

Try setting @save_and_open_page_path@:

Capybara.configure do |config|
  config.save_and_open_page_path = 'tmp/capybara'


27 Feb 2014, 19:51
Francisco Morales (1 post)

@Chris Persons

I had to add the code you suggested to get my page loading as well, where would the proper place to put this code be?

Thanks, Andre

You must be logged in to comment