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
6
votes
1 answer

Why do RSpec feature specs using Capybara, Poltergeist and Javascript fail inconsistently?

Hi fellow software developers, I have a Rails app with a usual testsuite set up (RSpec, Capybara, Poltergeist, jQuery, Rails). I use a little Javascript(jQuery) for remote requests. Basically it works and I don't understand my problem yet. So I may…
6
votes
3 answers

autocomplete method refuses to fire in RSpec test

I am on Day 4 of trying to get an autocomplete field to fire in an RSpec test. Works super in the browser, it is just incredibly resistant to running in my request specs. UPDATE: It looks like my RSpec/Capy scripts are running against the dev db…
RubyRedGrapefruit
  • 12,066
  • 16
  • 92
  • 193
6
votes
2 answers

Minimal Capybara / Poltergeist test returning empty page

It appears I'm retracing the steps taken in the SO post: Capybara, Poltergeist and Phantomjs and giving an empty response in body. (Mark this as a duplicate if you want, but I'm including a minimal standalone test case and version…
fearless_fool
  • 33,645
  • 23
  • 135
  • 217
6
votes
1 answer

capybara-webkit cannot simulate click on (non link/button) element

In an rspec feature scenario I have: scenario 'shows things', js: true do page.find('#my_div').trigger(:click) This doesn't seem to fire the jQuery handler that's on the click event of this element. In the debugger this call returns an empty…
rigyt
  • 2,219
  • 3
  • 28
  • 40
6
votes
1 answer

NotImplementedError when switching to Poltergeist

I have this cucumber step definitions that work with Selenium but I get NotImplementedError when I try them with the poltergeist driver. phantom.js is installed and I can even take screenshots from my step definitions that look right. I'm testing an…
joscas
  • 7,474
  • 5
  • 39
  • 59
5
votes
1 answer

Capybara Poltergeist feature test failing on CI but passes locally

I'm having weird issues with some of my feature tests using Capybara with poltergeist driver. The test should perform a simple checkout in my online shop. They all pass fine on my local MacBook as well as on an Ubuntu vagrant box. However on CI…
philkry
  • 180
  • 5
5
votes
1 answer

Capybara, Poltergeist and Reactjs - 'undefined' is not a function

We started the process of integration Reactjs in our Rails 4.1 app. The thing is that a LOT of features are broken now. Here is the stack for tests: Cucumber Capybara Poltergeist (via phantomjs) Rspec For example, there is the cucumber feature:…
ExiRe
  • 4,727
  • 7
  • 47
  • 92
5
votes
1 answer

How to download CSV file with poltergeist using Capybara on phantomjs?

For a integration test, I need to download a CSV file using poltergeist driver with Capybara. In selenium(for example firefox/chrom webdriver), I can specify download directory and it works fine. But in poltergeist, is there a way to specify the…
barek2k2
  • 154
  • 5
5
votes
1 answer

How to retrieve innertext using capybara and poltergeist?

I have this simple HTML:
Test someting
How can I retrieve only the innertext of the div? Using text retrieves all text from the div: [1] pry(#)> first(:xpath, '//div').text => "Test someting" Using text() in my…
egwspiti
  • 957
  • 5
  • 10
5
votes
1 answer

Phantom JS Error with youtube video

Phantom JS Version: 1.9.1 Poltergeist Version: 1.3.0 Starting today youtube embedded videos now give a poltergeist error when running javascript tests. My youtube code is just the default embed youtube code. Here's a example: