Muhammad Adeel
Muhammad Adeel

Reputation: 79

Capybara poltergeist PhantomJs Status Fail Error

I'm using pure ruby & writing script in Ruby for some scripting work. I'm using capybara poltergeist to scrape ajax website which works quite good but for some website, it's giving Capybara::Poltergeist::StatusFailError error. I have tried to find a solution by doing some research but none of them is working in my case. I'm going to attach the code which I'm using so any help to fix that issue will be appriciated.

require 'capybara/poltergeist'
capybara = Capybara::Session.new(:poltergeist)
capybara.visit("https://www.azcentral.com/pages/interactives/news/local/arizona-data/arizona-government-salary-database/")

I have used the other possible solution also by registering the capybara gem like that

    Capybara.register_driver :poltergeist do |app|
        Capybara::Poltergeist::Driver.new(app, {js_errors: false})
        Capybara::Poltergeist::Driver.new(app, timeout: 300, phantomjs_options: ['--load-images=no'])
    end

Bur I have find out no solution which works for my case. So we need to find a solution which will work fot above mentioned website.

Upvotes: 3

Views: 84

Answers (0)

Related Questions