У меня есть следующий html-код в моем интерфейсе.
<form id="Status_Report" name="form1" method="post" ng-controller="Taxi_StatusCtrl">
<input type="text" name="textfield" id="Address" ng-model="Address_Taxi_Driver">
<table width="200">
<tr>
<td><label>
<input type="radio" name="RadioGroup1" value="1" id="RadioGroup1_0" ng-model="Status.name">
Avalible</label></td>
</tr>
<tr>
<td><label>
<input type="radio" name="RadioGroup1" value="0" id="RadioGroup1_1" ng-model="Status.name">
Busy</label></td>
</tr>
</table>
<input type="submit" name="submit" id="submit" value="Submit" ng-click="submit()">
<div id="sync-notification">
{{syncNotification}}
</div>
</form>
и мои шаги для огурца таковы:
Then(/^I submit my status in the system$/) do
visit "http://agile-system-lashkarara.c9users.io:8080/#/Taxi_Status"
fill_in "Address", with: @taxi_address
click_button "Submit"
end
Проблема в том, что я хочу попросить {{syncNotification}}
прочитать выражение {{syncNotification}}
и установить RadioGroup1_0
, но я не знаю, как это сделать?
Посмотрите здесь: https://gist.github.com/zhengjia/428105, в частности, в разделе =Interacting with forms=
раздел.
Вы должны быть в состоянии choose
свой переключатель.