I am getting am empty document back from phantomjs. I am trying to use Capybara and Poltergeist for setting up the phantomjs driver for Capybara.
I created a module
I also had the similar issue. But the below option setting :phantomjs_options
, helped me to solve the issue.
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app,
:phantomjs_options => ['--debug=no', '--load-images=no', '--ignore-ssl-errors=yes', '--ssl-protocol=TLSv1'], :debug => false)
end
It sounds like a bug in PhantomJS when visiting this website. I suggest trying to load the website using only PhantomJS (not Poltergeist or Capybara) to see whether that works. If it also has trouble, report a bug against PhantomJS.
You can read about PhantomJS here: https://github.com/ariya/phantomjs/wiki/Quick-Start
Get html with this instead
puts "html=#{page.html}"