我有此代码
@forelse($companies as $company)
<div class="custom-control custom-radio">
<div class="form-check">
<input class="custom-control-input" type="radio" id="company-{{$company->id}}" value="{{$company->id}}" name="company_id" >
<label class="custom-control-label" for="company-{{$company->id}}">
{{$company->name}}
</label>
</div>
</div>
我如何使用laravel黄昏进行测试??? 我尝试过了
$emailparts=explode('@',$userEmail);
$companies=Company::select('companies.*')->whereRaw("SUBSTRING_INDEX(companies.email,'@',-1)='{$emailparts[1]}'")->get();
->select("company-".$companies->random()->id)
但是它给了我这个错误
Facebook\WebDriver\Exception\NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"body select[name='company-16']"}
如何修复它?