Questions tagged [poltergeist]

Poltergeist is a Capybara driver for PhantomJS.

Poltergeist is a driver for Capybara. It allows you to run your Capybara tests on a headless WebKit browser, provided by PhantomJS.

490 questions
12
votes
1 answer

Ruby: Phantom.js blocked on specific site?

I am using capybara poltergeist to automate a small script on tumblr.com My script works fine with my chrome driver.. And my poltergeist driver loads all other websites just fine, but for some reason throws a Capybara::Poltergeist::StatusFailError…
BananaNeil
  • 10,322
  • 7
  • 46
  • 66
11
votes
3 answers

How can I test Stripe.js using poltergeist and Capybara?

I've been going nuts trying to write an automated test for my user sign up page. Users will be charged a recurring subscription via Stripe. They input their basic details (email, password, etc) and their credit card details on the same form, then…
GMA
  • 5,816
  • 6
  • 51
  • 80
11
votes
2 answers

Temporarily set js_errors to false in Poltergeist

I have a set of tests which lead to a Facebook page where the user logs in. Unfortunately, this page has some JavaScript errors which I can't influence, so my tests would never finish. Is there any way to temporarily disable the check for JS errors?…
TrashyMcTrash
  • 1,234
  • 2
  • 15
  • 39
11
votes
2 answers

How to instruct phantomjs to avoid timeout when using binding.pry

at some point, I don't know if you guys call it REPL-driven development or something, but I find myself inspecting the contents of my runtime by inserting a binding.pry call in some test. This works pretty well, except when I'm running Cucumber…
blackxored
  • 474
  • 5
  • 10
10
votes
1 answer

Increasing timeout of poltergeist

I need to increase the length of the timeout in Poltergeist. The poltergeist documentation says I need to put this code in my test setup Capybara.register_driver :poltergeist do |app| Capybara::Poltergeist::Driver.new(app, options) end I am new…
10
votes
1 answer

How do I configure Capybara to work with Poltergeist?

I have an RSpec integration test that needs to execute some JavaScript. I've included Poltergeist and installed PhantomJS, but whenever I run the example, I get this error: Failure/Error:…
Kevin
  • 14,655
  • 24
  • 74
  • 124
10
votes
1 answer

Cannot do save_screenshot give NotSupportedByDriver in Capybara/Poltergeist

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…
RedMage
  • 1,126
  • 1
  • 9
  • 21
9
votes
1 answer

Rails : Poltergeist doesn't seem to find an fully working phantomjs

I've created a small Rails app that checks recularly the content of one of my sites with poltergeist and Capybara. Everything works great in dev on my mac. But when I test it on my production server I get the following server.…
jlfenaux
  • 3,263
  • 1
  • 26
  • 33
8
votes
1 answer

Make capybara wait for an element to disappear

After a click on some element I expect a placeholder to disappear and another element to appear after an AJAX call is finished. find(someLocator).click expect(page).not_to have_css(disappearingPlaceholderLocator) expect(page).to…
BassT
  • 819
  • 7
  • 22
8
votes
1 answer

How do I drag and drop using poltergeist?

Right now I'm using the selenium driver with Capybara, but I'd like to switch to using Poltergeist. A lot of the interface I'm testing, though, involves dragging and dropping elements in particular locations on the page. I've written the following…
lobati
  • 9,284
  • 5
  • 40
  • 61
8
votes
3 answers

Rails Phantomjs, poltergeist, and Capybara not playing well together

Working in a rails 3.1.2 project (mac OS X), I have PhantomJS properly installed (I can run code like the following and it works perfectly, accurately grabbing the title of the page and saving an accurate screenshot) try_phantom.coffee page =…
Dave Collins
  • 1,077
  • 1
  • 15
  • 23
7
votes
2 answers

Capybara/Poltergeist - Wait for JavaScript completions

After I log in through devise I'm clicking on the button with attached javascript which makes some HTML visible.
T4ng10r
  • 727
  • 2
  • 11
  • 21
7
votes
1 answer

Poltergeist/PhantomJS crashing in Gitlab CI

Background: My testing suite did not handle any JS functionality until recently. I started out only on my machine with a selenium-webdriver javascript driver and firefox 47.0.1 with no issues. I then migrated over to poltergeist supporting PhantomJS…
Nick Schwaderer
  • 1,030
  • 1
  • 8
  • 21
7
votes
0 answers

Capybara Poltergeist Dead Client Error on CI

I have a Rails App using Angular JS to render the views and I am testing this app with Rspec, Jasmine, and Capybara with PhantomJS as a driver through Poltergeist. Locally all of the tests pass 100% of the time, but occasionally when someone pushes…
Zubatman
  • 1,235
  • 3
  • 17
  • 34
7
votes
3 answers

Capybara::Poltergeist Status error, failed to reach server

I am trying to make some tests with Rspec/Capybara/Poltergeist on my Rails 4 application, Phantomjs is installed (version 2.2.1), but I always get this error : Failure/Error: visit(perfect_landing_page_path) Capybara::Poltergeist::StatusFailError:…
Delphine
  • 93
  • 1
  • 3
1
2
3
32 33