Question

I am running Capybara with Poltergeist and I have a step:

Given(/^take a screenshot$/) do
  page.save_screenshot("/tmp/page.png", :full => true)
end

And it keeps saying:

Capybara::Driver::Base#save_screenshot (Capybara::NotSupportedByDriverError)
./features/step_definitions/job_steps.rb:19:in `/^take a screenshot$/'
features/jobs_board/user_management.feature:9:in `And take a screenshot'

Any ideas where to look? My config in env.rb looks like this:

Capybara.javascript_driver = :poltergeist
Capybara.current_driver = :poltergeist
Was it helpful?

Solution

Figured it out. I needed to add:

Capybara.default_driver = :poltergeist 

And change

require 'poltergeist'

to

require 'capybara/poltergeist'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top