Capybara, Poltergeist and Phantomjs and giving an empty response in body

前端 未结 3 519
眼角桃花
眼角桃花 2020-12-19 23:18

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

相关标签:
3条回答
  • 2020-12-19 23:38

    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
    
    0 讨论(0)
  • 2020-12-19 23:41

    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

    0 讨论(0)
  • 2020-12-19 23:41

    Get html with this instead puts "html=#{page.html}"

    0 讨论(0)
提交回复
热议问题