<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Verifying select field value with Cucumber and Webrat</title>
	<atom:link href="http://macksmind.net/2009/05/31/verifying-select-field-value-with-cucumber-and-webrat/feed/" rel="self" type="application/rss+xml" />
	<link>http://macksmind.net/2009/05/31/verifying-select-field-value-with-cucumber-and-webrat/</link>
	<description>Technical Wizardry, Rants, and just a Whiff of Insanity</description>
	<lastBuildDate>Tue, 13 Jul 2010 19:05:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: James</title>
		<link>http://macksmind.net/2009/05/31/verifying-select-field-value-with-cucumber-and-webrat/comment-page-1/#comment-6796</link>
		<dc:creator>James</dc:creator>
		<pubDate>Tue, 06 Jul 2010 07:46:02 +0000</pubDate>
		<guid isPermaLink="false">http://macksmind.net/?p=18#comment-6796</guid>
		<description>Thanks for the tip. I suggest that you use the following regex to insure that you don&#039;t get false positives:

/^#{value}$/

e.g. Without the anchors, if the selected value is &quot;Mrs&quot; and I expect &quot;Mr&quot;, it will still match and return a false positive result.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip. I suggest that you use the following regex to insure that you don&#8217;t get false positives:</p>
<p>/^#{value}$/</p>
<p>e.g. Without the anchors, if the selected value is &#8220;Mrs&#8221; and I expect &#8220;Mr&#8221;, it will still match and return a false positive result.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ganesh Shankar</title>
		<link>http://macksmind.net/2009/05/31/verifying-select-field-value-with-cucumber-and-webrat/comment-page-1/#comment-6735</link>
		<dc:creator>Ganesh Shankar</dc:creator>
		<pubDate>Fri, 25 Jun 2010 01:31:35 +0000</pubDate>
		<guid isPermaLink="false">http://macksmind.net/?p=18#comment-6735</guid>
		<description>Thanks for the tip! I&#039;m actually using Capybara so I had to rework your step to get it to work. For those other Capybara users out there... this is what you need:

Then /^&quot;([^&quot;]*)&quot; should be selected for &quot;([^&quot;]*)&quot;$/ do &#124;value, field&#124;
  find_field(field).node.xpath(&quot;.//option[@selected = &#039;selected&#039;]&quot;).inner_html.should =~ /#{value}/
end

Cheers,
Ganesh</description>
		<content:encoded><![CDATA[<p>Thanks for the tip! I&#8217;m actually using Capybara so I had to rework your step to get it to work. For those other Capybara users out there&#8230; this is what you need:</p>
<p>Then /^&#8221;([^"]*)&#8221; should be selected for &#8220;([^"]*)&#8221;$/ do |value, field|<br />
  find_field(field).node.xpath(&#8220;.//option[@selected = 'selected']&#8220;).inner_html.should =~ /#{value}/<br />
end</p>
<p>Cheers,<br />
Ganesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://macksmind.net/2009/05/31/verifying-select-field-value-with-cucumber-and-webrat/comment-page-1/#comment-6191</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Thu, 15 Apr 2010 21:02:32 +0000</pubDate>
		<guid isPermaLink="false">http://macksmind.net/?p=18#comment-6191</guid>
		<description>Florent, your fix worked for me as well. field_labeled was always giving an error saying it couldn&#039;t find the field. Thanks!</description>
		<content:encoded><![CDATA[<p>Florent, your fix worked for me as well. field_labeled was always giving an error saying it couldn&#8217;t find the field. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damien White</title>
		<link>http://macksmind.net/2009/05/31/verifying-select-field-value-with-cucumber-and-webrat/comment-page-1/#comment-6080</link>
		<dc:creator>Damien White</dc:creator>
		<pubDate>Sun, 28 Mar 2010 02:15:59 +0000</pubDate>
		<guid isPermaLink="false">http://macksmind.net/?p=18#comment-6080</guid>
		<description>Great post, worked like a charm.</description>
		<content:encoded><![CDATA[<p>Great post, worked like a charm.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Florent</title>
		<link>http://macksmind.net/2009/05/31/verifying-select-field-value-with-cucumber-and-webrat/comment-page-1/#comment-5723</link>
		<dc:creator>Florent</dc:creator>
		<pubDate>Fri, 26 Feb 2010 12:48:31 +0000</pubDate>
		<guid isPermaLink="false">http://macksmind.net/?p=18#comment-5723</guid>
		<description>Very Well then.

It didn&#039;t work for me because of the field_labeled.
It works now with field_named(field) :)

Thanks for your post !</description>
		<content:encoded><![CDATA[<p>Very Well then.</p>
<p>It didn&#8217;t work for me because of the field_labeled.<br />
It works now with field_named(field) :)</p>
<p>Thanks for your post !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mack Earnhardt</title>
		<link>http://macksmind.net/2009/05/31/verifying-select-field-value-with-cucumber-and-webrat/comment-page-1/#comment-5708</link>
		<dc:creator>Mack Earnhardt</dc:creator>
		<pubDate>Thu, 25 Feb 2010 17:04:19 +0000</pubDate>
		<guid isPermaLink="false">http://macksmind.net/?p=18#comment-5708</guid>
		<description>It works for me as is. Those quotes aren&#039;t delimiters in this context, and I want to capture everything between the quotes in the () backreference.</description>
		<content:encoded><![CDATA[<p>It works for me as is. Those quotes aren&#8217;t delimiters in this context, and I want to capture everything between the quotes in the () backreference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Florent</title>
		<link>http://macksmind.net/2009/05/31/verifying-select-field-value-with-cucumber-and-webrat/comment-page-1/#comment-5707</link>
		<dc:creator>Florent</dc:creator>
		<pubDate>Thu, 25 Feb 2010 16:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://macksmind.net/?p=18#comment-5707</guid>
		<description>Exactly what I needed, but did you forget to escape auotes in your regexp ?

&quot;([^\&quot;]*)&quot; instead of &quot;([^&quot;]*)&quot;</description>
		<content:encoded><![CDATA[<p>Exactly what I needed, but did you forget to escape auotes in your regexp ?</p>
<p>&#8220;([^\"]*)&#8221; instead of &#8220;([^"]*)&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brad</title>
		<link>http://macksmind.net/2009/05/31/verifying-select-field-value-with-cucumber-and-webrat/comment-page-1/#comment-5283</link>
		<dc:creator>Brad</dc:creator>
		<pubDate>Fri, 22 Jan 2010 04:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://macksmind.net/?p=18#comment-5283</guid>
		<description>I don&#039;t know if this is a new feature, but i&#039;m using webrat 0.6 and 

field_labeled(field).value

works just fine for select boxes also.  You&#039;re then just matching against the option value, not the text.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know if this is a new feature, but i&#8217;m using webrat 0.6 and </p>
<p>field_labeled(field).value</p>
<p>works just fine for select boxes also.  You&#8217;re then just matching against the option value, not the text.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Aldred</title>
		<link>http://macksmind.net/2009/05/31/verifying-select-field-value-with-cucumber-and-webrat/comment-page-1/#comment-5109</link>
		<dc:creator>Rob Aldred</dc:creator>
		<pubDate>Fri, 08 Jan 2010 17:58:49 +0000</pubDate>
		<guid isPermaLink="false">http://macksmind.net/?p=18#comment-5109</guid>
		<description>Perfect, thank you for your post</description>
		<content:encoded><![CDATA[<p>Perfect, thank you for your post</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://macksmind.net/2009/05/31/verifying-select-field-value-with-cucumber-and-webrat/comment-page-1/#comment-4441</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Thu, 19 Nov 2009 20:06:35 +0000</pubDate>
		<guid isPermaLink="false">http://macksmind.net/?p=18#comment-4441</guid>
		<description>Thanks for this solution, saved me some time!</description>
		<content:encoded><![CDATA[<p>Thanks for this solution, saved me some time!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
