Laravel 黄昏断言 404 错误

编程入门 行业动态 更新时间:2024-10-26 16:22:13
本文介绍了Laravel 黄昏断言 404 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我正在尝试使用 laravel dusk 来测试 404 not found 错误.特别是在加载图像时.阅读 laravel dusk 文档后,我发现没有任何断言可以帮助我测试是否发生 404 异常.

I'm trying to use laravel dusk to test for 404 not found error. Specifically when loading an image. After reading the laravel dusk documentation I've found no asserts that could help me test if a 404 exception occurs.

是否有一种很好的方法可以让浏览器测试了解资源是否加载失败或根本不可能?

Is there a good way of getting a browser test to know whether a resource has failed loading or is it simply not possible?

推荐答案

故意无法访问 HTTP 状态代码:

There is intentionally no way to access HTTP status codes:

https://github/laravel/dusk/issues/422
https://github/facebook/php-webdriver/issues/470

这篇关于Laravel 黄昏断言 404 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 22:56:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1401107.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:断言   黄昏   错误   Laravel

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!