Add wait_for_ajax helper