Typo in the new version of the book

9 views
Skip to first unread message

Den Dem

unread,
Sep 22, 2015, 8:41:20 AM9/22/15
to TestWise
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?

Den Dem

unread,
Sep 22, 2015, 8:42:32 AM9/22/15
to TestWise
Also, not sure but 
 is_ajax_comlete = driver.execute_script("return jQuery.active == 0");

is ; required?

Zhimin

unread,
Sep 22, 2015, 4:33:54 PM9/22/15
to TestWise
 is_ajax_comlete = driver.execute_script("return jQuery.active == 0");

is_ajax_comlete is that you wanted?

Yes, it was a typo. 
is ; required?
In Ruby, the ';' is optional for one line statement. 

Thanks for your feedback.
 
Reply all
Reply to author
Forward
0 new messages