Screenshot is not created
PirunSeng opened this issue · comments
Pirun Seng commented
Hi There,
I have page.save_screenshot('test.png')
, but no file created.
feature 'create', js: true do
before do
visit root_path
end
scenario 'valid' do
page.save_screenshot('test.png')
end
end
Here is my spec_helper.rb
require 'capybara/poltergeist'
Capybara.register_driver :poltergeist do |app|
options = {
js_errors: false,
phantomjs_options: ['--load-images=false', '--ignore-ssl-errors=yes', '--ssl-protocol=any'],
timeout: 60,
debug: true
}
Capybara::Poltergeist::Driver.new(app, options)
end
Capybara.javascript_driver = :poltergeist
Ruby 2.3.3
Capybara 2.15.4
Poltergeist 1.9.0
PhantomJS 2.1.1
Previously, I had Capybara 2.5, and the screenshot worked just fine. Not sure if that caused by Capybara version.
Pirun Seng commented
I've just found out that it is not Poltergeist issue. I've missed read about changing path of the created file for the newer version of Capybara. Docs