<?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>blogging and scraping &#187; watir</title>
	<atom:link href="http://www.tsnpc.com/category/watir/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tsnpc.com</link>
	<description></description>
	<lastBuildDate>Mon, 12 Jul 2010 22:54:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>The poor support of the firewatir 1.6.5 to Chinese characters</title>
		<link>http://www.tsnpc.com/the-poor-support-of-the-firewatir-1-6-5-to-chinese-characters/</link>
		<comments>http://www.tsnpc.com/the-poor-support-of-the-firewatir-1-6-5-to-chinese-characters/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 09:05:41 +0000</pubDate>
		<dc:creator>leleba</dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[Chinese characters]]></category>

		<guid isPermaLink="false">http://www.tsnpc.com/the-poor-support-of-the-firewatir-1-6-5-to-chinese-characters/</guid>
		<description><![CDATA[I cannot figure out how to enter the Chinese characters into the textfield of a webpage by firewatir 1.6.5, I tried to change the encoding of the .rb file and the encoding of the firefox browser, but failed. require &#8216;rubygems&#8217; require &#8216;firewatir&#8217; ff = FireWatir::Firefox.new ff.goto &#8220;http://www.google.com&#8220; sleep 1 ff.text_field(:name, &#8216;q&#8217;).set(&#8216;?&#8217;) For Watir 1.6.5, the [...]]]></description>
			<content:encoded><![CDATA[<p>I cannot figure out how to enter the Chinese characters into the textfield of a webpage by firewatir 1.6.5, I tried to change the encoding of the .rb file and the encoding of the firefox browser, but failed.</p>
<p>require &#8216;rubygems&#8217; <br/>require &#8216;firewatir&#8217;</p>
<p>ff = FireWatir::Firefox.new <br/>ff.goto &#8220;<a href="http://www.google.com">http://www.google.com</a>&#8220;</p>
<p>sleep 1 <br/>ff.text_field(:name, &#8216;q&#8217;).set(&#8216;?&#8217;)</p>
<p>For Watir 1.6.5, the Chinese charaters can be supported by replacing the script WIN32OLE.codepage = WIN32OLE::CP_UTF8 with WIN32OLE.codepage = WIN32OLE::CP_ACP in the file of C:\Ruby\lib\ruby\gems\1.8\gems\watir-1.6.5\lib\watir\win32ole.rb <br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tsnpc.com/the-poor-support-of-the-firewatir-1-6-5-to-chinese-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Check the version of the watir and the firewatir</title>
		<link>http://www.tsnpc.com/check-the-version-of-the-watir-and-the-firewatir/</link>
		<comments>http://www.tsnpc.com/check-the-version-of-the-watir-and-the-firewatir/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 08:35:14 +0000</pubDate>
		<dc:creator>leleba</dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://www.tsnpc.com/check-the-version-of-the-watir-and-the-firewatir/</guid>
		<description><![CDATA[We can check the version of the watir and firewatir by executing an rb file with the following script: require &#8216;watir&#8217; require &#8216;firewatir&#8217; puts Watir::IE::VERSION puts FireWatir::Firefox::VERSION]]></description>
			<content:encoded><![CDATA[<p>We can check the version of the watir and firewatir by executing an rb file with the following script:</p>
<p>require &#8216;watir&#8217;</p>
<p>require &#8216;firewatir&#8217;</p>
<p>puts Watir::IE::VERSION</p>
<p>puts FireWatir::Firefox::VERSION</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tsnpc.com/check-the-version-of-the-watir-and-the-firewatir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It is safe require &#8220;rubygems&#8221; in the begining of the watir codes</title>
		<link>http://www.tsnpc.com/it-is-safe-require-rubygems-in-the-begining-of-the-watir-codes/</link>
		<comments>http://www.tsnpc.com/it-is-safe-require-rubygems-in-the-begining-of-the-watir-codes/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 04:39:10 +0000</pubDate>
		<dc:creator>leleba</dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[rubygems]]></category>

		<guid isPermaLink="false">http://www.tsnpc.com/it-is-safe-require-rubygems-in-the-begining-of-the-watir-codes/</guid>
		<description><![CDATA[Maybe it is safe to add the code of require &#8216;rubygems&#8217; in the beginning of the watir codes, otherwise, strange results may happen sometimes .]]></description>
			<content:encoded><![CDATA[<p>Maybe it is safe to add the code of require &#8216;rubygems&#8217; in the beginning of the watir codes, otherwise, strange results may happen sometimes .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tsnpc.com/it-is-safe-require-rubygems-in-the-begining-of-the-watir-codes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>the fucntion ie.collect in watir</title>
		<link>http://www.tsnpc.com/the-fucntion-ie-collect-in-watir/</link>
		<comments>http://www.tsnpc.com/the-fucntion-ie-collect-in-watir/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 00:44:51 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[collect]]></category>

		<guid isPermaLink="false">http://www.tsnpc.com/?p=207</guid>
		<description><![CDATA[Just copy a coding found in the internet for future reference, $ie.divs.collect {&#124;div&#124; if div.class_name == &#8220;data&#8221; puts div.text end }]]></description>
			<content:encoded><![CDATA[<p>Just copy a coding found in the internet for future reference,</p>
<p>$ie.divs.collect {|div|<br />
if div.class_name == &#8220;data&#8221;<br />
   puts div.text<br />
end<br />
} </p>
]]></content:encoded>
			<wfw:commentRss>http://www.tsnpc.com/the-fucntion-ie-collect-in-watir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The fast way to fill a textfield in watir</title>
		<link>http://www.tsnpc.com/the-fast-way-to-fill-a-textfield-in-watir/</link>
		<comments>http://www.tsnpc.com/the-fast-way-to-fill-a-textfield-in-watir/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 15:30:55 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[text field]]></category>

		<guid isPermaLink="false">http://www.tsnpc.com/?p=205</guid>
		<description><![CDATA[It is quite slow to fill a text field by ie.text_field().set(content), the fast way is by ie.text_field().value = content.]]></description>
			<content:encoded><![CDATA[<p>It is quite slow to fill a text field by ie.text_field().set(content), the fast way is by ie.text_field().value = content.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tsnpc.com/the-fast-way-to-fill-a-textfield-in-watir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>There is no property of class for iframe in watir</title>
		<link>http://www.tsnpc.com/there-is-no-property-of-class-for-iframe-in-watir/</link>
		<comments>http://www.tsnpc.com/there-is-no-property-of-class-for-iframe-in-watir/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 15:21:24 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[property]]></category>

		<guid isPermaLink="false">http://www.tsnpc.com/?p=202</guid>
		<description><![CDATA[I encountered an iframe in a webpage which say &#8220;iframe class = &#8220;the_iframe&#8221;, I tried but failed to access the iframe by: ie.frame(:class, &#8220;the_iframe&#8221;) and then I figured out there is no property of class for iframe in watir, and find the iframe by index: ie.frame(:index, 1) we can use ie.show_frames to find how many [...]]]></description>
			<content:encoded><![CDATA[<p>I encountered an iframe in a webpage which say &#8220;iframe class = &#8220;the_iframe&#8221;, I tried but failed to access the iframe by:<br />
ie.frame(:class, &#8220;the_iframe&#8221;)</p>
<p>and then I figured out there is no property of class for iframe in watir, and find the iframe by index:<br />
ie.frame(:index, 1)</p>
<p>we can use ie.show_frames to find how many frames are there in a webpage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tsnpc.com/there-is-no-property-of-class-for-iframe-in-watir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Be careful to &#8220;include Watir&#8221;</title>
		<link>http://www.tsnpc.com/be-careful-to-include-watir/</link>
		<comments>http://www.tsnpc.com/be-careful-to-include-watir/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 06:12:39 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[include Watir]]></category>

		<guid isPermaLink="false">http://www.tsnpc.com/?p=199</guid>
		<description><![CDATA[When we have the &#8220;include Watir&#8221;, then we cannot load another ruby file. I spent more than 1 hour to figure out this.]]></description>
			<content:encoded><![CDATA[<p>When we have the &#8220;include Watir&#8221;, then we cannot load another ruby file.</p>
<p>I spent more than 1 hour to figure out this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tsnpc.com/be-careful-to-include-watir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>watir to count the links in a search list on a webpage</title>
		<link>http://www.tsnpc.com/watir-to-count-the-links-in-a-search-list-on-a-webpage/</link>
		<comments>http://www.tsnpc.com/watir-to-count-the-links-in-a-search-list-on-a-webpage/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 11:10:25 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[find_all]]></category>
		<category><![CDATA[links]]></category>

		<guid isPermaLink="false">http://www.tsnpc.com/?p=190</guid>
		<description><![CDATA[Some times I need to check the amount of the links in a search list, at first I try and failed by: ie.links(:id, /bra bra/).length and then I find a solution by: ie.div(:id, &#8220;searchList&#8221;).links and then by googles, I find a better solution: links_searchlist = ie101.links.find_all { &#124;link&#124; link.class_name == &#8216;permalink&#8217; } puts &#8220;the links [...]]]></description>
			<content:encoded><![CDATA[<p>Some times I need to check the amount of the links in a search list, at first I try and failed by:<br />
ie.links(:id, /bra bra/).length</p>
<p>and then I find a solution by:<br />
ie.div(:id, &#8220;searchList&#8221;).links</p>
<p>and then by googles, I find a better solution:<br />
links_searchlist = ie101.links.find_all { |link| link.class_name == &#8216;permalink&#8217; }<br />
puts &#8220;the links in the searchlist:&#8221;<br />
puts links_searchlist.length</p>
<p>and in another case, following code also works:<br />
searchlistlinks = ie102.links.find_all { |link| link.id =~ /hitURL/ }<br />
links_searchlist = searchlistlinks.length<br />
puts links_searchlist</p>
<p>following can also work:<br />
searchlistlinks = ie33.links.find_all { |link| link.href =~ /something/ }<br />
but be careful that the following (url) will not work:<br />
searchlistlinks = ie33.links.find_all { |link| link.url =~ /something/ }</p>
<p>Recently I found the best solution by google:<br />
links = ie51.div(:id, ‘threadlist’).html.scan(/something/).count<br />
puts links</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tsnpc.com/watir-to-count-the-links-in-a-search-list-on-a-webpage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gems for web scrape</title>
		<link>http://www.tsnpc.com/gems-for-web-scrape/</link>
		<comments>http://www.tsnpc.com/gems-for-web-scrape/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 06:28:40 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[hpricot]]></category>
		<category><![CDATA[mechanize]]></category>
		<category><![CDATA[nokogiri]]></category>
		<category><![CDATA[scrubyt]]></category>
		<category><![CDATA[webrat]]></category>

		<guid isPermaLink="false">http://www.tsnpc.com/?p=186</guid>
		<description><![CDATA[I just put the names of the gems here for future reference: hpricot nokogiri mechanize webrat scrubyt]]></description>
			<content:encoded><![CDATA[<p>I just put the names of the gems here for future reference:<br />
hpricot<br />
nokogiri<br />
mechanize<br />
webrat<br />
scrubyt</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tsnpc.com/gems-for-web-scrape/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The most useful site for watir</title>
		<link>http://www.tsnpc.com/the-most-useful-site-for-watir/</link>
		<comments>http://www.tsnpc.com/the-most-useful-site-for-watir/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 03:37:43 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[watir]]></category>
		<category><![CDATA[rubyforge]]></category>

		<guid isPermaLink="false">http://www.tsnpc.com/?p=184</guid>
		<description><![CDATA[I always googles when I encounter any problem related to watir, but after these years&#8217; practice, I will state that the most useful site for watir is http://wtr.rubyforge.org/rdoc/, most answer is already there.]]></description>
			<content:encoded><![CDATA[<p>I always googles when I encounter any problem related to watir, but after these years&#8217; practice, I will state that the most useful site for watir is http://wtr.rubyforge.org/rdoc/, most answer is already there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tsnpc.com/the-most-useful-site-for-watir/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
