这是我的情景:
Scenario: Search for class name that consist "dance"
Given I am on "/classes"
When I select "Class Name" from "filter"
And I fill in "dance" at "search"
When I press "Search"
这是页面的html:
<div class="row" style="margin:0;">
<div class="2u 12u$(medium)" style="padding-left:0;">
<form method="POST" action="{{ URL::to('/') }}/classes">
<div class="12u$">
<div class="select-wrapper form-group" style="width:150px;">
<select name="filter" id="filter">
<option value="keywords">- Filter by -</option>
<option value="keywords">All</option>
<option value="benefits">Benefits</option>
<option value="classname">Class name</option>
<option value="description">Description</option>
<option value="start date">Start Date</option>
</select>
</div>
</div>
</div>
<form method="POST" action="{{ URL::to('/') }}/classes">
<div class="form-group" style="padding-left:0;">
<input type="text" value="" placeholder="Search" id="search" name="search" style="height: 42px; width: 300px;"/>
<input type="hidden" name="_token" value="{{ csrf_token() }}">
</div>
当我使用behat features / view.feature运行测试用例时 我收到错误:
When I select "Class Name" from "filter"
Form field with id|name|label|value "filter" not found.
如何解决此错误???