Month: May 2016

A Better wait_for_ajax

def wait_for_ajax  counter = 0  while page.evaluate_script(“typeof($) === ‘undefined'”)   counter += 1   print “^”   $stdout.flush   sleep(0.1)   raise “Jquery not initialized after 10 seconds.” if counter >= 100  end  counter =…