<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>just_add_watir &#124; Advanced recipes for Watir &#187; .include</title>
	<atom:link href="http://justaddwatir.com/tag/include/feed/" rel="self" type="application/rss+xml" />
	<link>http://justaddwatir.com</link>
	<description>Advanced recipes for Watir</description>
	<lastBuildDate>Wed, 21 Oct 2009 02:44:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Q. How do I check if text exists in browser?</title>
		<link>http://justaddwatir.com/2008/q-how-do-i-check-if-text-exists-in-browser/</link>
		<comments>http://justaddwatir.com/2008/q-how-do-i-check-if-text-exists-in-browser/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 03:43:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[.include]]></category>
		<category><![CDATA[.text]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://justaddwatir.com/watir/?p=6</guid>
		<description><![CDATA[A. Use the .include? method or a regular expression ...
Example html:

&#60;p&#62;
  watir does not go well with furry little animals
&#60;/p&#62;

Example watir:

puts &#34;Text 'watir' DOES exist&#34; if @b.text.include? 'watir'
puts &#34;Text 'regex' DOES NOT exist&#34; unless @b.text =~ /regex/
puts &#34;Text 'furry little animals' DOES exist&#34; if @b.text.include? 'furry little animals'
puts &#34;Text 'furry animals' DOES NOT exist&#34; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>A. Use the .include? method or a regular expression ...</strong><br />
<a href="http://justaddwatir.com/watir/test_html/tc_0001_0100/test_0005.html">Example html</a>:</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">p</span>&gt;</span>
  watir does not go well with furry little animals
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">p</span>&gt;</span></pre></div></div>

<p>Example watir:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Text 'watir' DOES exist&quot;</span> <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#0066ff; font-weight:bold;">@b</span>.<span style="color:#9900CC;">text</span>.<span style="color:#9966CC; font-weight:bold;">include</span>? <span style="color:#996600;">'watir'</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Text 'regex' DOES NOT exist&quot;</span> <span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#0066ff; font-weight:bold;">@b</span>.<span style="color:#9900CC;">text</span> =~ <span style="color:#006600; font-weight:bold;">/</span>regex<span style="color:#006600; font-weight:bold;">/</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Text 'furry little animals' DOES exist&quot;</span> <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#0066ff; font-weight:bold;">@b</span>.<span style="color:#9900CC;">text</span>.<span style="color:#9966CC; font-weight:bold;">include</span>? <span style="color:#996600;">'furry little animals'</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Text 'furry animals' DOES NOT exist&quot;</span> <span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#0066ff; font-weight:bold;">@b</span>.<span style="color:#9900CC;">text</span>.<span style="color:#9966CC; font-weight:bold;">include</span>? <span style="color:#996600;">'furry animals'</span></pre></div></div>

<p>Any character(s) placed between the apostrophe's will be searched for. The response will return <strong>true</strong> if found, and <strong>false</strong> if not found.</p>
]]></content:encoded>
			<wfw:commentRss>http://justaddwatir.com/2008/q-how-do-i-check-if-text-exists-in-browser/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
