Hi, just got your updated book for Ruby and there is typo
Section - “Wait AJAX Call to complete using JQuery”
def wait_for_ajax_complete(max_seconds)
max_seconds.times do
is_ajax_comlete = driver.execute_script("return jQuery.active == 0");
if is_ajax_comlete
return
end
sleep(1)
end
raise "Timed out waiting for AJAX call after #{max_seconds} seconds"
end
is_ajax_comlete is that you wanted?