Closed bettysteger closed 12 years ago
I have the same issue, but only on Travis CI with Ruby Enterprise Edition:
http://travis-ci.org/#!/magiclabs/alchemy_cms/jobs/2123243/L1069
The method that causes this error is always the same:
def login_into_alchemy
visit '/alchemy/admin/login'
fill_in('alchemy_user_session_login', :with => 'jdoe')
fill_in('alchemy_user_session_password', :with => 's3cr3t')
click_on('Login')
end
So nothing fancy in here. You can visit the page yourself: http://demo.alchemy-cms.com/admin/login
The strange thing about it is, that on my local machine all tests pass, even with REE.
Just put a sleep 1
between visit
and fill_in
:
http://travis-ci.org/#!/magiclabs/alchemy_cms/jobs/2123618
As you can see this does not help. So no timing issue. What else?
And this build contains a debug log:
http://travis-ci.org/#!/magiclabs/alchemy_cms/jobs/2134392/L633
I have the same issue. On Mac it's all good. Just not on a ubuntu box. :(
I have this issue on my mac.
$ phantomjs -v
1.6.1
$ which phantomjs
/usr/local/bin/phantomjs
In my features/support/env.rb
require 'capybara/poltergeist'
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app,
timeout: 5, debug: true, phantomjs: "/usr/local/bin/phantomjs")
end
Capybara.javascript_driver = :poltergeist
@tvdeyen @ywen @drnic hi guys, please see the above commit I just added. I'm not sure if this will actually solve your problems, but it will at least prevent the JS throwing a TypeError. It also means that the Capybara retry mechanism will work properly. Please give it a try and let me know how it goes?
Just make sure this is in the master branch correct? I will give it a try maybe tomorrow. Thanks!
Yes, master branch.
Yay, the error is gone! Thanks
I'm having this problem on master. The test passes when using the Chrome driver, but with Poltergeist it fails with:
One or more errors were raised in the Javascript code on the page:
TypeError: 'undefined' is not an object (evaluating 'rect.top')
at /Users/andyw/.rvm/gems/ruby-1.9.3-p194/gems/poltergeist-0.7.0/lib/capybara/poltergeist/client/compiled/agent.js:311
at /Users/andyw/.rvm/gems/ruby-1.9.3-p194/gems/poltergeist-0.7.0/lib/capybara/poltergeist/client/compiled/agent.js:99
at /Users/andyw/.rvm/gems/ruby-1.9.3-p194/gems/poltergeist-0.7.0/lib/capybara/poltergeist/client/compiled/agent.js:15
at phantomjs://webpage.evaluate():2
at phantomjs://webpage.evaluate():3
at phantomjs://webpage.evaluate():3
at phantomjs://webpage.evaluate():3
@andyw8 from that stack trace, it doesn't look like you're using master.
Ah, my mistake. I'd specified the ref in the Gemfile but not the git repo so the ref was being ignored. All passing now.
@andyw8 I am facing same problem. Test fails with Poltergeist. How to resolve?
@nchandratre please post a new issue with details about your problem
i am getting the following error
the problem was that i have required something in a css file that didn't exist: *= require_tree ./landing i got an error when going to localhost:3000: require_tree argument must be a directory (Sprockets::ArgumentError)
so i have solved this problem by added the right directory... but i got in the wrong direction with that error message!