0
我想讓webrat從列表中選擇一個單選按鈕,使用黃瓜。黃瓜&網絡,從單選按鈕列表中選擇
我有這樣的場景:
Scenario: Update an existing article
Given I have an article with title Big Bananas and body text Big yellow bananas are good for you
And I am on the list of articles
When I choose "Big Bananas"
And press "Update article"
And I fill in "Title" with "Massive Bananas"
And I press "Save"
Then I should have an article titled Massive Bananas
And I should not have an article titled Big Bananas
我的視圖包含:
.
.
<% @articles.each do |article| %>
<tr>
<td><%= radio_button_tag "article", article.title %></td>
<td><%= article.title %></td>
<td>
<%article.tags.each do |tag|%>
<div><%= tag.name %></div>
<%end%>
</td>
</tr>
<%end%>
.
.
的問題是,我需要我的單選按鈕ID是文章的標題這樣的網絡老鼠可以挑它從我的黃瓜場景,目前我的產品的輸出看起來像這樣:
<tr>
<td><input id="article_big_bananas" name="article" type="radio" value="Big Bananas" /></td>
<td>Big Bananas</td>
<td>
<div>fruit</div>
<div>yellow</div>
</td>
</tr>
任何想法我應該怎麼做?
'當我選擇「article_big_bananas」'不起作用? – jdl 2010-09-06 22:05:07