这是通过等待您未完成的ajax调用达到0来完成的。jQuery.active会为您进行检查。
在FeatureContext.php中,您可以执行以下操作;
public function iShouldSeeAnErrorBalloon($title){ $time = 5000; // time should be in milliseconds $this->getSession()->wait($time, '(0 === jQuery.active)'); // asserts below}并确保您使用运行javascript和ajax的Mink驱动程序(默认情况下不运行)。



