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

Capybara/Poltergeist: Check that div has children

I need a way to check if an element has children.
user2158382
  • 4,430
  • 12
  • 55
  • 97
0
votes
1 answer

Enabling HTML5 cache manifest in Poltergeist/PhantomJS tests

My app is using HTML5 cache manifest file and caches several js/css/html files on the client side. We are having problems with Poltergeist testing - same tests run with Selenium pass. With Poltergeist the first test passes (the files are not yet…
Bartłomiej Skwira
  • 1,701
  • 1
  • 16
  • 24
0
votes
2 answers

Trouble writing capybara/poltergeist test for a "check all" checkbox

Working on an admin panel for an app I'm building, I built an option to "check all" of the check boxes in a particular column. On my localhost it is 100% working as intended; but when I went back to fix up my integration tests, I ran into a load of…
Conner Smith
  • 383
  • 4
  • 7
0
votes
1 answer

How does one test the content of confirm dialogs using poltergeist?

The capybara-webkit driver allows you to test the content of any confirm dialog messages that are triggered by the app. Is there a way to do this in poltergeist?
cddr
  • 300
  • 2
  • 8
0
votes
1 answer

How to test RESTful call to database without seeding data?

I have a dropdown box that is populated using data from the database (via Angular). I am trying to test it with Capybara and Poltergeist using: select('San Francisco', from: "user_region") As the test database starts with a clean DB, the…
Delos Chang
  • 1,823
  • 3
  • 27
  • 47
0
votes
1 answer

Capybara.javascript_driver = :poltergeist not showing browser during testing

I am trying to test using poltergeist, but the browser is not shown when I run my tests. This is my spec_helper.rb: # This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' require…
tardjo
  • 1,594
  • 5
  • 22
  • 38
0
votes
1 answer

Capybara with Poltergeist (PhantomJS) not rendering page and fonts correctly

The setup in spec_helper.rb is: require 'capybara/poltergeist' Capybara.register_driver :poltergeist do |app| Capybara::Poltergeist::Driver.new(app, { js_errors: true }) end Capybara.javascript_driver = :poltergeist Then in the scenario I…
valk
  • 9,363
  • 12
  • 59
  • 79
0
votes
1 answer

Rspec + Capybara + Poltergeist fails to submit form

I have a form in a Rails application that uses the tokenInput jQuery plugin. In order to test the form, I have added poltergeist as the js driver and added js: true to the specs. However, as soon as I enable javascript on any given spec, the…
Stuart
  • 644
  • 1
  • 6
  • 13
0
votes
1 answer

trying to get simple poltergeist example running

I was playing around with selenium via rspec but was dissatisfied and I saw recommendations for poltergeist. When I try to run it with my tests, it seems like the poltergeist driver doesn't show up where it should. I was a little confused where rack…
user1456508
  • 3,761
  • 2
  • 15
  • 11
0
votes
2 answers

How to get ID of object from session in cucumber features

So I'm writing acceptance features for my Shops cart actions and would like to verify that clicking the Edit Cart link takes me to the edit_cart_path. So I have a Cucumber step definition: Then(/^I should be on the (.*) page$/) do |page_name| …
deiga
  • 1,587
  • 1
  • 13
  • 32
0
votes
1 answer

Render page element with padding in Poltergeist

I would like take screenshot of element with page context, let say 10px around element. In PhantomJs I would do it phantom.clipRect = { top: 14, left: 3, width: 400, height: 300 }; phantom.render(output); I did not find clipRect in Poltergeist. Is…
0
votes
2 answers

Testing javascript refreshes using multiple VCR cassettes

I'm using Capybara and Poltergeist to test an index page that uses setTimeout to periodically refresh page content. The page content transitions between three states, based on an external service, and I've got a cassette for each of these…
0
votes
1 answer

Error installing poltergeist on ruby 2.0

I am having problems installing the poltergeist gem. I receive the following error: ERROR: Error installing poltergeist: poltergeist requires Ruby version >= 1.9.2. I am using ruby-2.0.0-p195 on a OS X Mountain Lion v10.8.4. My gem list is as…
user1523236
  • 1,403
  • 3
  • 20
  • 43
0
votes
1 answer

Capybara / Poltergeist Internals: Running the Server in a Separate Process/Environment

I'm attempting to use Capybara and Poltergeist to automate taking screenshots of my Rails application. I already have this sort of working, and I've integrated the functionality with Rails' asset pipeline. (See this question for more on…
Ajedi32
  • 45,670
  • 22
  • 127
  • 172
0
votes
1 answer

Cannot fill test data into a form with rspec, capybara and selenium

I'm testing my Ruby on Rails 3.2 App with RSpec, Capybara and Selenium (Used driver: webkit and poltergeist). I will try testing the following code: scenario 'ask a question', js: true do visit group_path(@group, locale: 'en') …
sn3ek
  • 1,929
  • 3
  • 22
  • 32
1 2 3
32
33