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
Figured it out. I needed to add:
Capybara.default_driver = :poltergeist
And change
require 'poltergeist'
to
require 'capybara/poltergeist'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With