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
7
votes
0 answers

HTML5 Form Validation with Capybara, PhantomJS and Poltergeist

I have a modal dialog (bootstrap modal-content) with a form on it. The form has a field for an email:
Daryn
  • 3,394
  • 5
  • 30
  • 41
7
votes
1 answer

How do I check for Javascript errors using capybara and poltergeist?

I'm trying to figure out how exactly to implement this functionality of Poltergeist into my existing Capybara tests, and I'm not having any luck after reading the documentation here: https://github.com/teampoltergeist/poltergeist I have included the…
7
votes
1 answer

CKEditor and Poltergeist/PhantomJS - [CKEDITOR.resourceManager.load] Resource name "default" was not found at "http://cdn.ckeditor.com

[CKEDITOR.resourceManager.load] Resource name "default" was not found at "http://cdn.ckeditor.com/4.4.7/full/styles.js?t=F0RD". I intermittently run into this error while running integration tests in Poltergeist. While researching the issue I've…
Constant Meiring
  • 3,285
  • 3
  • 40
  • 52
7
votes
2 answers

How to Test JavaScript error in Capybara/Poltergeist

I need to check has page a JavaScript error. Solution for capybara-webkit http://blog.55minutes.com/2013/10/test-javascript-with-capybara-webkit/ require 'spec_helper' feature 'Home' do it 'should not have JavaScript errors', :js => true do …
vovan
  • 1,460
  • 12
  • 22
7
votes
2 answers

Using url_for in Rails/Capybara/Poltergeist spec sends the driver to example.com instead of the app

If I call url_for within a feature spec, it returns an absolute URL starting with http://www.example.com/. Capybara will happily attempt to load pages on that site, but that has nothing to do with my app. Here are minimal steps to reproduce the…
pdg137
  • 3,552
  • 2
  • 21
  • 24
7
votes
2 answers

Poltergeist Stripe checkout.js

I'm trying to test in my Rails app the Stripe checkout popup (http://www.stripe.com/checkout). I was using Capybara + selenium-driver and everything worked well. When the page is loaded, the checkout.js adds an iframe, and I was able to access…
parov
  • 1,077
  • 4
  • 12
  • 22
7
votes
1 answer

Check alert box text in Capybara

I am using rspec and capybara for test with rails 4.0 I am displaying an alert box after sending ajax request. I want to test alert box text in my spec. Is there any way to test it ?
userxyz
  • 1,100
  • 8
  • 14
7
votes
1 answer

Poltergeist page.driver.resize(width, height) and page.driver.scroll_to(left, top) are doing nothing

I'm using poltergiest and phantomjs for my integration tests and I need to test behavior for a user scrolling down the page and adjusting the browser window. I've used both page.driver.resize(width, height) and page.driver.scroll_to(left, top). I've…
7
votes
2 answers

List child elements for a Capybara/Poltergeist element

I've searched around and I can't find a way to do this. We are running Capybara tests with the Poltergeist driver in cucumber features on an EmberJS/Rails app. I can't use page.driver.debug because I'm running inside a headless vagrant instance, so…
alaina
  • 103
  • 1
  • 7
7
votes
3 answers

How to test JQuery-file-upload with RSpec and Capybara

I have implemented a JQuery-file-upload in my Rails4 app. File upload works when I manually test it from the browser, but my test for it fails. Below is my spec for the JQuery-file-upload: require 'spec_helper' feature 'Evidences' do context…
Gjaldon
  • 5,534
  • 24
  • 32
7
votes
2 answers

@javascript cucumber tests pass using selenium driver but fail when using poltergiest

I'm trying to test an jquery UI autocomplete, I've got the tests passing using the selenium driver. I want to switch to poltergiest for some headless testing, but now my tests are now failing. It doesn't seem to select the autocomplete option for…
Martinffx
  • 2,426
  • 4
  • 33
  • 60
6
votes
1 answer

How to run a function on a page with Capybara/Poltergeist?

I have a page with JS functions (which are called on mouse click) within tags. While I was testing I had encountered problems with .click method not working many times. Therefore I decided to simply call that function…
Riman
  • 65
  • 1
  • 4
6
votes
1 answer

Webfont path, rspec, capybara and poltergeist

I'm in the process of converting my Capybara test suite from capybara-webkit to poltergeist. -require 'capybara/webkit' +require 'capybara/poltergeist' -Capybara.javascript_driver = :webkit +Capybara.javascript_driver = :poltergeist While running…
awilkening
  • 1,062
  • 8
  • 26
6
votes
3 answers

Opening a new tab in Capybara / Poltergeist

I'm trying to open a link by clicking on it using capybara/poltergeist which opens up in a new tab. I can't seem to get it working. @session.find().click just seems to stay on the same page, as does click_link…
Carpela
  • 2,155
  • 1
  • 24
  • 55
6
votes
2 answers

Close Modal with Capybara

I have a modal that closes when its overlay div is clicked. The overlay extends over the entire page but underneath the modal itself. I want to close this modal in my tests, and it's important that it closes when the overlay is clicked. # modal,…
steel
  • 11,883
  • 7
  • 72
  • 109
1 2
3
32 33