Laravel 5.4 HTTP测试-方法seeInElement [英] Laravel 5.4 HTTP testing - method seeInElement

查看:127
本文介绍了Laravel 5.4 HTTP测试-方法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.

https://laravel.com/api /5.3/Illuminate/Foundation/Testing/Concerns/InteractsWithPages.html#method_seeInElement

在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆