Laravel 5.4 HTTP测试-方法seeInElement [英] Laravel 5.4 HTTP testing - method seeInElement
问题描述
在Laravel 5.3中,有一个seeInElement方法,该方法将根据CSS选择器检查元素内的文本.
In Laravel 5.3 there was a seeInElement method which would check the text inside an element based on a CSS selector.
在5.4中,它已移至Laravel Dusk.
In 5.4 this has been moved to Laravel Dusk.
我仍然在5.4上使用HTTP测试( https://laravel.com/docs/5.4/http-tests ),因为它们可以更快地完成我想做的测试,但现在却缺少此方法.
I still use the HTTP Tests with 5.4 ( https://laravel.com/docs/5.4/http-tests ) because they're faster for the testing I want to do, but it's now missing this method.
有办法找回吗?
推荐答案
您需要laravel/browser-kit-testing
软件包.请参阅此处的升级指南:
https://laravel.com/docs/5.4/upgrade#testing
You need the laravel/browser-kit-testing
package. See the upgrade guide here:
https://laravel.com/docs/5.4/upgrade#testing
这篇关于Laravel 5.4 HTTP测试-方法seeInElement的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!