At 07:15 PM 1/13/2005, Jim Weirich wrote:
>I just stumbled across watir from a posting on Brian Maricks blog and am
>considering using it at work where having IE available isn't an issue.
>
>But I'm running Linux at home and a non-IE solution would be great.  Have you
>considered writing a ruby-based browser skeleton?  Just enough browser to
>request web pages and give information to your browser controller software.
>Actually rendering wouldn't be necessary (I think). It would be quite useful.

We have plans for just this situation.

Rather than use the approach you outline, we plan to use dependency 
injection to allow Watir-based tests to run either using the IE/COM driver, 
like they do currently (Windows only), or a new driver that will use 
Selenium to allow the tests to run in any browser on any platform.

Selenium is sever-side test automation software that currently supports 
in-browser testing on IE, Mozilla and Firefox on Windows, Mac and Linux. 
Seriously. The tests actually run in your browser of choice using a 
javascript automation engine that is implanted into the browser from the 
server. It's not fast, but it is very accurate and convincing.

You can see this for yourself, if you point a browser of your choice at 
http://selenium.thoughtworks.com/demo1/TestRunner.html

This is just a very rough mock up of what we are aiming for. The version of 
Selenium that is currently released only works with the static test files 
that you see in this demo, which i think is pretty boring. But we have 
prototypes checked in that allow Java and Ruby scripts to execute against 
this very same API.

Here's what works today:

>require 'selenium'
>
>puts "Go to http://localhost:7896/selenium-driver/SeleneseRunner.html"
>selenium = Selenium::WebrickCommandProcessor.new.proxy
>
>selenium.open('/test_click_page1.html')
>selenium.verifyText('link', 'Click here for next page')
>selenium.clickAndWait('link')
>selenium.verifyLocation('/test_click_page2.html')
>selenium.clickAndWait('previousPage')
>selenium.verifyText("link", "This is WRONG")
>selenium.verifyElementPresent("link")
>selenium.testComplete()

It is truly very raw, but ThoughtWorks is putting significant effort behind 
this tool. Expect rapid progress.

I am actually a contributor to both the Selenium and Watir projects. Watir 
is just starting to knock the socks off testers and is getting them to want 
to learn Ruby. Selenium will have drivers in Java, Ruby, .Net, Python and 
other languages. But i want to make Ruby be the thing for it too and 
integrate it with Watir, so that the same tests can be run in either 
configuration.

Some of you may recall that i showed you a precursor to Watir at RubyConf 
2003. It's come a long way.

Wanna help? Let me know.

Bret


Report on Open Source Web Test Tools (featuring Watir)
http://www.io.com/~wazmo/blog/archives/2005_01.html#000227

Selenium
http://selenium.thoughtworks.com/index.html
http://confluence.public.thoughtworks.org/display/SEL/Home

Watir
http://wtr.rubyforge.org/


_____________________
  Bret Pettichord
  www.pettichord.com