Laravel 8 等待页面跳转
2021-07-26 09:22 更新
在给出类似 $browser->assertPathIs('/home') 路径断言时,如果 window.location.pathname 被异步更新,断言就会失败。可以使用 waitForLocation 方法等待页面跳转到给定路径:
$browser->waitForLocation('/secret'); 还可以等待被命名的路由跳转:
$browser->waitForRoute($routeName, $parameters); 以上内容是否对您有帮助:

免费 AI IDE


更多建议: