Hi I have error in my capybara
testing env
unknown error: jQuery is not defined
(Session info: chrome=43.0.2357.125)
I think it's related to ajax wait function
def wait_for_ajax
Timeout.timeout(Capybara.default_wait_time) do
element = false
until element do
begin
sleep(0.05)
count = 0
begin
element = page.evaluate_script('jQuery.active') == 0
rescue Errno::ECONNRESET => e
count += 1
restart_phantomjs
retry unless count > RETRY_COUNT_ERROR_CONNECT
rescue Capybara::Poltergeist::DeadClient
count += 1
restart_phantomjs
retry unless count > RETRY_COUNT_ERROR_CONNECT
rescue Capybara::Poltergeist::JavascriptError
end
end
end
end
end
Any idea how to solve this? Any help is welcomed. Maybe updating chrome driver is required, not sure whats going on.