I need to increase the length of the timeout in Poltergeist. The poltergeist documentation says I need to put this code in my test setup
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, options)
end
I am new to testing I am not sure where the test setup. I am using Rpsec and Capybara. Could somebody help out please?
This should work:
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, timeout: 1.minute)
end
Are you having long running javascript or ajax?
https://coderwall.com/p/aklybw/wait-for-ajax-with-capybara-2-0 and http://robots.thoughtbot.com/automatically-wait-for-ajax-with-capybara - how to handle ajax
There is also a way to disable animation in tests, to make it run faster. And if you have some elements with position: fixed
then poltergeist will see text behind it as invisible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With