Laravel 5.4 HTTP testing - method seeInElement

喜夏-厌秋 提交于 2019-12-24 08:55:53

问题


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

In 5.4 this has been moved to Laravel Dusk.

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.

Is there a way to get this back?


回答1:


You need the laravel/browser-kit-testing package. See the upgrade guide here: https://laravel.com/docs/5.4/upgrade#testing



来源:https://stackoverflow.com/questions/43531404/laravel-5-4-http-testing-method-seeinelement

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!