Questions tagged [poltergeist]
Poltergeist is a Capybara driver for PhantomJS.
493
questions
0
votes
0answers
19 views
TypeError: undefined is not a function (evaluating 'navigator.sendBeacon')
When I run my specs, I am facing this error. When I debug the specs, I came to know that wherever I use the click_button "login" at that time rspec throw this error into the logs.
Testcases ...
0
votes
0answers
38 views
Poltergeist undefined method `write' when run rspec
Why I am getting this whenever I run bundle exec rspec?
$ bundle exec rspec spec/features/schools_spec.rb --backtrace
Randomized with seed 31356
DEPRECATION WARNING: Dangerous query method (method ...
0
votes
1answer
26 views
Capybara tests pass with Selenium but fail with Poltergeist
I have differing behaviour between Capybara tests when run with Selenium / geckodriver and Poltergeist / phantomjs drivers. Ultimately, I want to know why I'm seeing different CSS results being ...
0
votes
0answers
34 views
Not allowed to load local resource: Capybara + Rspec
I have one button Display PDF and it has on click javascript like this:
window.open("/users/1/exports/hello.pdf", '_blank');
By clicking on that button rails application is opening pdf in new tab ...
0
votes
0answers
35 views
How can I login to a Angular.io coded site using Nokogiri and Capybara/poltergeist?
I am trying to login to a site for scraping purposes and it looks like they are using Angular.io. First I tried with Mechanize and logger without success so now I am using Capybara and Nokogiri.
This ...
1
vote
1answer
46 views
Rspec, Capybara and Poltergiest: Failed to reach server only when js: true is enabled
I have working integration/feature tests using Rails 4, rspec-rails 3.6, and capybara 2.18. I am trying to get these tests to pass on pages that are being rewritten in a javascript framework (React). ...
2
votes
0answers
58 views
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::...
1
vote
0answers
32 views
Capybara 3 & Poltergeist normalize consecutive whitespaces
I've updated Capybara to version 3.29.0 (with Poltergeist 1.18.1), and the whitespaces are not normalized like in version 2, meaning the \n characters appear in page.text, which is what I expected. ...
0
votes
1answer
52 views
Rspec Capybara Broken Pipe
i have a Errno::EPIPE:Broken Pipe error on
capybara/poltergeist/web_socket_server.rb running Rspec with poltergeist
this is my configuration :
Capybara.javascript_driver = :poltergeist
Capybara....
1
vote
1answer
240 views
How do I view local storage and session storage using capybara
I'm doing some analysis to confirm what data is being stored on the client by various interactions with some websites.
I'd like to automate this using Capybara (and Poltergeist / headless chrome).
I ...
0
votes
1answer
59 views
Poltergeist JS/Headless Chrome - Switch to offline mode
I am looking to write a test where I can switch between Offline mode and back to Online mode mid way through a cucumber test. I can manually achieve this via Dev Tools in Chrome but is there a way to ...
0
votes
0answers
37 views
Cucumber, poltergeist strange error, while running code
I am getting below error while executing Cucumber test cases,
Below mentioned error details, when I execute command cucumber
ā cart git:(master) ā cucumber
Feature: To see cart options
...
0
votes
1answer
130 views
Capybara Upgrade Capybara::Query
I have an old project with Capybara version 2.7.1. One file has the following code
module Capybara
module Node
module Finders
def all(*args)
using_wait_time 1 do
xpath = ...
0
votes
0answers
170 views
Poltergeist detected another element with CSS selector
I saw this error when I was scraping dashboard with Capybara + Poltergeist. I already tried the option suggested in the other posts but didn't work yet.
Firing a click at co-ordinates [1571.5, 584] ...
1
vote
1answer
162 views
How to access to the new page with form and target=“_blank” through capybara
I am trying to scrape this page with capybara + poltergeist.
<form action="/agency/advertiser/login" method="POST" role="form" target="_blank">
<input type="hidden" name="csrfToken" ...
0
votes
1answer
206 views
How to trigger keyup in capybara tests. I have tried all the standard methods
I have written the following rspec/capybara test:
scenario "admin can create patient invoices with discounted items", driver: :poltergeist do
product = create(:product, practice_group: ...
0
votes
1answer
51 views
The difference between the user and the bot
I practice in rails and the following question arose - how does the site is determined by the user, person or bot?
I use RoR - Capybara with Poltergeist
There is the following code:
require '...
0
votes
1answer
95 views
“JQMIGRATE” error when visiting an https site with capybara and poltergeist in ruby program
I have a program
It was running fine about a year and a half ago when I last ran it, but running it now I get an error.
I have made a small program that demonstrates the error.
The program is-
...
1
vote
0answers
164 views
Poltergeist in CircleCI: TypeError: undefined is not an object (evaluating 'this.__reactAutoBindMap')
Webpacker version: 3.5.5
React/ReactDOM version: 16.6.3
Poltergeist version: 1.10.0
React-Rails version: 1.6.2
React_UJS version: 2.4.4
PROBLEM:
Running my test build on CircleCI I run into a ...
0
votes
1answer
151 views
Unknown Format in feature testing rails capybara
I am writing capybara tests. There is a link I have in the view. When I click over the link that links open a pop-up js warning. I have configured Js. in capybara by using phantomjs and petergiest gem....
0
votes
1answer
42 views
Where is this text coming from with poltergeist?
I'm scraping my library's website with Poltergeist, in my first experience with that gem (or with Capybara, for that matter). It's working great. Super great.
def self.scrape_book_list(url)
...
0
votes
1answer
329 views
How to trigger a JQuery 'change' function from a Capybara/Poltergeist test
On a form we have the following select field:
<select class="hundred js-select2 js-country-check select2-hidden-accessible" name="pledge[pledgor_home_country]" id="pledge_pledgor_home_country" ...
0
votes
1answer
208 views
Poltergeist: phantomjs_logger option ignored
In this setup:
require 'capybara/poltergeist'
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, {
phantomjs_options: ['--ignore-ssl-errors=yes', '--ssl-...
0
votes
0answers
48 views
How to identify source of new javascript error in stale Rails app
Trying to 'thaw' a year-old project and seeing some strange javascript errors. I haven't had much luck searching for solution.
I'm guessing it has something to do with something on my dev box being ...
0
votes
0answers
171 views
Attempted to assign to readonly property on Capybara
I'm working on updating a rails 3.2 app to rails 4.2.10, I've got almost everything worked out, unit tests and integration tests passing.
I'm having some issues with feature tests, I'm using capybara ...
0
votes
2answers
47 views
Button name option is missing for headless mode when send patch request
I have a form which sends PATCH request with multiple submitting buttons
button_tag "Save", type: "submit", class: "btn btn-secondary", name: "commit", value: "save"
button_tag "Submit", type: "...
0
votes
1answer
103 views
Capybara poltergeist not executing the mdc webpack application.js file
I have a rails 5 running application. I am using mdc components for styling.
I have a javascript function that calls new mdc.mdcTextFeild(.....)
This works perfectly fine in a browser environment. ...
0
votes
1answer
355 views
What can cause Capybara::Poltergeist::TimeoutError: in group testing that doesn't individually?
A Rails app that uses remote testing to test a CakePHP app running on a Vagrant Ubuntu VM.
My OS is macOS High Sierra.
'rspec/rails'
'capybara/rails'
'capybara/mechanize'
'capybara/poltergeist'
'...
1
vote
0answers
250 views
Capybara feature test (js: true, React) fails because image element forced to make request
I have a form page that renders react components. These components render images that have been uploaded to the local environment (normally they are uploaded to s3).
Originally, I setup my test ...
0
votes
0answers
177 views
RSpec + Poltergeist fails when setting authenticity_token
I am trying to test a feature in my Rails app using RSpec + Polgergeist.
My feature spec is very basic right now:
RSpec.feature 'Listing owners can create new listings' do
let(:owner) { create(:...
0
votes
0answers
152 views
Capybara can't find element on page on CI server
So I have an integration test that works locally, but not on the CI server.
On the CI server it gets hung up on looking for an element on the page, and seemingly in rendering the page itself.
Any ...
0
votes
0answers
232 views
Clicking an element (not link or button) in Capybara
I'm doing an integration test wherein I need to click an html class element and it will go to controller action using Ajax.
Here's my html slim code:
table.table-default
thead
tr Title
tbody
...
1
vote
1answer
237 views
Rails rspec feature tests are failing using 'stripe-ruby-mock' gem
In development environment, I'm able to test stripe payment(using test card).But running rspec feature test, the payment fails and I'm getting the following error.
Support for test mode requests ...
1
vote
0answers
86 views
Q: The previous page is refreshed when browser back of PhantomJS ? can prevent refresh by back foward cache disabled?
I executed acceptence test with using capybara + poltergeist + phantomjs.
My test environment like this
phantomjs: stable 2.1.1
capybara (2.15.1)
poltergeist (1.13.0)
I simulated the ...
1
vote
2answers
405 views
Webshot gem is not capturing the finished page
I am attempting to take screen shots of maps generated with mapbox. I successfully took screenshots until I started storing my data in a file, which mapbox recommends if you have a lot of data. (https:...
0
votes
1answer
398 views
Rails 4: stubbing in a Capybara & Poltergeist integration test
I'm having trouble testing a rather simple spec using Capybara & Poltergeist in a Rails 4 app.
The spec looks like this:
feature 'Creating user groups', :devise, js: true do
let(:panel) { ...
0
votes
0answers
82 views
Rspec Capybara poltergeist Element not found
Rspec - 3.7.1
poltergeist (1.17.0)
I have a feature test running with js: true
it fails with
Failure/Error:
within(page.find('#by_category')) do
select(category_2.name, from: '...
0
votes
1answer
337 views
Phantomjs does not load the CSS/JS correctly
I am having the issue that phantomjs doesn't render the page correctly when I am running the tests. Please see the attached picture .
Feature Helper Code:
require 'rails_helper'
require 'capybara-...
1
vote
2answers
141 views
Prevent phantomjs from raising Capybara::Poltergeist::StatusFailError when requesting never ending assets
I am having some issues with Capybara::Poltergeist::Driver
When I visit the the following url with poltergeist, I am exerpiencing an issue where an asset that seemingly doesn't exist takes for ever ...
0
votes
1answer
283 views
Is there a way to perform Ctrl + click with Capybara and Poltergeist?
I'm trying to write a Capybara test which tests multi select using ctrl on Windows and command key on MacOS.
I found a solution here which works only if I use Selenium as my driver. Testing jQuery ...
4
votes
1answer
451 views
Capybara: First test times out with 'failed to reach server, check DNS and/or server status', all other tests work fine
I maintain several extension for the Spree/Solidus Rails platform(s), and for some reason on one extension in particular Iām having a Capybara issue I canāt seem to track down.
Once I build a test ...
0
votes
1answer
88 views
Poltergeist can't find the element sometimes
I am using phantomjs 2.1.1, ruby 2.3.1p112. Here is my code:
Capybara.default_driver = :poltergeist
page.find('input[type="submit"]').trigger("click")
page.should have_content("#{user.email}...
1
vote
1answer
45 views
Javascript tests using poltergeist and capybara accessing internal api
I am using capbara with poltergeist to run my javascript tests and i often get this error, it is trying to access internal api,it is even worse when my internet connection is off as more tests start ...
0
votes
1answer
276 views
Capybara - How to click button that is enabled by javascript while it was initialed as disabled?
I have a form with only one input box and a submit button in which the submit button is disabled until the user fill in something in the text box.
Unluckily, when I check the screenshot 'form.png', ...
0
votes
1answer
43 views
Ruby cucumber rspec Poltergeist test fails to find text inside an iframe
I have a Ruby cucumber poltergeist test which constantly fails when running on the CI Jenkins server with the following error but runs ok locally.
expected to find text "Medals table final positions" ...
0
votes
1answer
78 views
Poltergeist #visit doesn't [always] load the page
I have an integration test that runs through a "confirm details" process, and then goes back to the main page to verify that the details have indeed been processed.
However, when I visit the main ...
0
votes
2answers
769 views
Capybara - Poltergeist - JavascriptError: Undefined is not a constructor
I have this strange error in a new project where i want to work with Angular and make a ajax-search through fake data. The search is working, but when i try to create a test with the environment ...
0
votes
2answers
163 views
Capybara, Poltergeist, PhantomJS, evaluate_script, callback
I am using the following code, which uses the imagesLoaded package with a callback to tell me when an element with a particular csspath has finished loading all of its images:
imagesLoadedScript = &...
0
votes
1answer
304 views
How to test ActionCable with Capybara and poltergeist inside Docker?
I need to test ActionCable functionality inside a dockerized rails app, running JS tests with Poltergeist (PhantomJS).
I've tried selenium-webdriver, chromedriver, headless chrome... nothing works.
...
0
votes
1answer
119 views
Form Builder is not rendered via Capybara spec
I have a Rails app which is using formBuilder. When I visit the page manually on my browser in which I render my form with the formBuilder, it works just fine. But visiting the page via Capybara spec &...