<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.9" -->
<rss version="0.92">
<channel>
	<title>just_add_watir &#124; Advanced recipes for Watir</title>
	<link>http://justaddwatir.com</link>
	<description>Advanced recipes for Watir</description>
	<lastBuildDate>Wed, 21 Oct 2009 02:44:26 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Q. firefox-bin quit unexpectedly ?</title>
		<description><![CDATA[If you are trying to run Firewatir on Mac OSX and you see the following error message
"firefox-bin quit unexpectedly"
Have a look at the detailed error message available from an irb terminal e.g.

$  irb
&#62;&#62;require 'firewatir'
=&#62; true
&#62;&#62; browser &#124;&#124; Firefox.new
dyld: Library not loaded: /usr/lib/libsqlite3.dylib
  Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
  Reason: Incompatible library version: Security requires version 9.0.0 [...]]]></description>
		<link>http://justaddwatir.com/2009/q-firefox-bin-quit-unexpectedly/</link>
			</item>
	<item>
		<title>Q. How do I integrate watir with TestLink?</title>
		<description><![CDATA[A. This requires several hacks and use of the developer API ...

The first step to integrating these products is to download and install
TestLink 1.8.0 BETA2
Once finished, add the TestLink API BETA
Their blog has installation instructions for both.
Regarding the API there are a number of changes you will need to ensure:
1. create api_developer_keys table using the [...]]]></description>
		<link>http://justaddwatir.com/2008/q-how-do-i-integrate-watir-with-testlink/</link>
			</item>
	<item>
		<title>Q. How do I install watir standalone?</title>
		<description><![CDATA[A previous post highlights some ways in which you can install watir from behind a proxy server via the command line.
This approach can be problematic when using authenticated proxy servers. The following file is a simple MSI which will install Watir 1.5.6 with its required dependencies. The pre-requisites for this MSI are:
1. Ruby 1.8.6 installed [...]]]></description>
		<link>http://justaddwatir.com/2008/q-how-do-i-install-watir-standalone/</link>
			</item>
	<item>
		<title>Q. How do I use ci_reporter in my Test::Unit scripts?</title>
		<description><![CDATA[A. Use a ci_reporter gem ...
To install the ci_reporter gem on windows:

gem install ci_reporter

If you're using Test::Unit, ensure the ci/reporter/rake/test_unit_loader.rb file is loaded before the test is run. If you're using RSpec, you‘ll need to pass the following arguments to the spec command:

 --require GEM_PATH/lib/ci/reporter/rake/rspec_loader
 --format CI::Reporter::RSpec

You may also want to set the output directory [...]]]></description>
		<link>http://justaddwatir.com/2008/q-how-do-i-use-ci_reporter-in-my-testunit-scripts/</link>
			</item>
	<item>
		<title>Q. How do I pass command line arguments to Test::Unit?</title>
		<description><![CDATA[A. Use the -- argument to stop processing Test::Unit specific arguments ...
Module Test::Unit has its own command line arguments as specified by the following:

~/just_add_watir $&#62;ruby test_suite.rb --help
Test::Unit automatic runner.
Usage: test/unit/graph_test.rb [options] [-- untouched arguments]
&#160;
    -r, --runner=RUNNER              Use the given [...]]]></description>
		<link>http://justaddwatir.com/2008/q-how-do-i-pass-command-line-arguments-to-testunit/</link>
			</item>
	<item>
		<title>Q. How do I execute arbitrary javascript?</title>
		<description><![CDATA[A. Use the .goto method to call the javascript ...
Example html:

&#60;html lang=&#34;en-US&#34; xmlns=&#34;http://www.w3.org/1999/xhtml&#34; xml:lang=&#34;en-US&#34;&#62;
  &#60;body scroll=&#34;no&#34;&#62;
    &#60;script type=&#34;text/javascript&#34; charset=&#34;utf-8&#34;&#62;
      function openWin(i){
         alert(i);
      }
    &#60;/script&#62;
    &#60;div id=&#34;menuLayer1&#34;&#62;
  [...]]]></description>
		<link>http://justaddwatir.com/2008/q-how-do-i-execute-arbitrary-javascript/</link>
			</item>
	<item>
		<title>Q. How do I learn all the objects on a page? [firewatir]</title>
		<description><![CDATA[Sometimes you might wish to implement a QTP-like 'object repository'. I've had most success implementing this via Ruby modules.
To 'learn' all the objects on a page using firewatir you can use a simple script like this:

require 'rubygems'
require 'firewatir'
&#160;
class NilClass
  def length
    0
  end
end
&#160;
class DiscoverObjects
  include FireWatir
&#160;
  def initialize&#40;url&#41;
 [...]]]></description>
		<link>http://justaddwatir.com/2008/how-do-i-learn-all-the-objects-on-a-page-firewatir/</link>
			</item>
	<item>
		<title>Q. How do I enter the current date or time into a textfield?</title>
		<description><![CDATA[A. Use the Time.now method ...
Example html:

&#60;html&#62;
   &#60;body&#62;
      &#60;form method=&#34;post&#34; action=&#34;&#34;&#62;
         &#60;textarea name=&#34;comments&#34; cols=&#34;40&#34; rows=&#34;1&#34;&#62;
            Enter your comments here...
         &#60;/textarea&#62;&#60;br /&#62;
 [...]]]></description>
		<link>http://justaddwatir.com/2008/q-how-do-i-enter-the-current-date-or-time-into-a-textfield/</link>
			</item>
	<item>
		<title>Q. How do I get the text displayed in a javascript popup?</title>
		<description><![CDATA[A. Use the WIN32OLE extension library with the autoit function library ...
You will need to install autoit. You can download it here, once installed you can call the function library using the win32OLE extension library.
Example html:

&#60;html&#62;
   &#60;head&#62;
   &#60;script language=&#34;javascript&#34;&#62;
      function msgbox (textstring) {
    [...]]]></description>
		<link>http://justaddwatir.com/2008/q-how-do-i-get-the-text-displayed-in-a-javascript-popup/</link>
			</item>
	<item>
		<title>Q. How do I attach to a current IE session?</title>
		<description><![CDATA[A. Use the .attach method...
Example watir:

@b=Watir::IE.attach&#40;:title,//&#41;

I have used regex here for the window title, you can be more specific if you like.
]]></description>
		<link>http://justaddwatir.com/2008/q-how-do-i-attach-to-a-current-ie-session/</link>
			</item>
</channel>
</rss>
