Watir attracts Ruby Newbies

(Bret Pettichord) #1

Watir is rapidly attracting users. (We pronounce it 'water'.)

Many of our users are new to Ruby and even new to object-oriented languages.

In fact, they can't tell where Watir ends and Ruby begins. Thus, they end up asking lots of questions to the Watir mailing list (wtr-general@rubyforge.org) that are really just Ruby questions.

I gave a presentation of Watir's precursor at the Ruby Conference 2003 in Austin. At that time, i said that we were using Ruby as our scripting language because it was intuitive and easy to learn for non-programmers.

But now they are wanting to read data from spreadsheets or csv files or initialization files. Or they want to create libraries. Or they want help with Test::Unit.

I consider myself middling in my Ruby skills. I've heard meta-classes explained at least three times and still don't understand them. But i'm one of the more knowledgable people on the list.

We could use your help. If you are interested in helping new users learn how to use Ruby, please consider joining our mailing list. (Or you could just help Brian with his book.)

Oh, and BTW, we now have a gem for Watir ('gem install watir'). It has unit tests and rdoc. And yes, Watir only works on Windows and only with Internet Explorer. I offer apologies to the OSS gods.

http://wtr.rubyforge.org/

Bret

···

_____________________
  Bret Pettichord
  www.pettichord.com

(James Britt) #2

Bret Pettichord wrote:

Watir is rapidly attracting users. (We pronounce it 'water'.)

Many of our users are new to Ruby and even new to object-oriented languages.

In fact, they can't tell where Watir ends and Ruby begins. Thus, they end up asking lots of questions to the Watir mailing list (wtr-general@rubyforge.org) that are really just Ruby questions.

I gave a presentation of Watir's precursor at the Ruby Conference 2003 in Austin. At that time, i said that we were using Ruby as our scripting language because it was intuitive and easy to learn for non-programmers.

But now they are wanting to read data from spreadsheets or csv files or initialization files. Or they want to create libraries. Or they want help with Test::Unit.

I've some Watir tools that I've been meaning to clean up and package nicely Real Soon Now, but have suspicions that it will never happen.

I wanted to have non-Rubyists run some tests, but didn't want to have to coax them into installing Ruby. Or learning Ruby, for that matter. I sort of built up a DSL syntax as well, so that the test scripts were simpler than straight Ruby, too.

I wrote an app that kicks off an instance of WEBrick, which looks into a /scripts dir for user-defined test scripts, and creates a default home page listing the available scripts, rendered by automagically launching the default browser. Clicking on a script link would run that script. Error/info messages would then be displayed on another page as scripts ran.

The code was bundled up using rubyscript2exe and packaged into a a zip file so that one could just drop it someplace on a target machine, unzip it to get a set of permanent directories (where one could store new test scripts), and double-click the exe to run the script server.

It never gained any traction at the contract place I was working at the time, but I use it all the time myself (though I don't bother bundling it with rubyscript2exe for myself).

I don't think I really have time to follow another mailing list, but I'd like to turn this code over to someone on the Watir team if they think it useful.

Suggestions?

James Britt

···

--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys

#3

In article <5.1.0.14.2.20050830004040.02df47e8@127.0.0.1>,

Watir is rapidly attracting users. (We pronounce it 'water'.)

Many of our users are new to Ruby and even new to object-oriented languages.

In fact, they can't tell where Watir ends and Ruby begins. Thus, they end
up asking lots of questions to the Watir mailing list
(wtr-general@rubyforge.org) that are really just Ruby questions.

I gave a presentation of Watir's precursor at the Ruby Conference 2003 in
Austin. At that time, i said that we were using Ruby as our scripting
language because it was intuitive and easy to learn for non-programmers.

But now they are wanting to read data from spreadsheets or csv files or
initialization files. Or they want to create libraries. Or they want help
with Test::Unit.

I consider myself middling in my Ruby skills. I've heard meta-classes
explained at least three times and still don't understand them. But i'm one
of the more knowledgable people on the list.

We could use your help. If you are interested in helping new users learn
how to use Ruby, please consider joining our mailing list. (Or you could
just help Brian with his book.)

Oh, and BTW, we now have a gem for Watir ('gem install watir'). It has unit
tests and rdoc. And yes, Watir only works on Windows and only with Internet
Explorer. I offer apologies to the OSS gods.

http://wtr.rubyforge.org/

Bret,

I guess this is a good problem to have :wink:

Why not point people to this list when they have general Ruby questions?

Also: my understanding is that Watir works only on IE because it uses
Win32OLE. Any thoughts about creating a cross-browser solution (maybe
kind of like Selenium)? I also wonder if maybe something like the new
MouseHole proxy could be used to capture communication between browser and
server and then 'play back' the interactions somehow.

Phil

···

Bret Pettichord <bret@pettichord.com> wrote:

(Bret Pettichord) #4

Sounds cool! I would be interested to take a look at your code and see if i can find an owner for it.

Bret

···

At 08:40 AM 8/30/2005, James Britt wrote:

I don't think I really have time to follow another mailing list, but I'd like to turn this code over to someone on the Watir team if they think it useful.

_____________________
  Bret Pettichord
  www.pettichord.com

(Tanner Burson) #5

what I'm calling HTTPRecorder, which is extremely similar to what you're
describing. It's a WEBrick proxy server that records all the HTTP requests,
and will hopefully generate either HTTP::Mechanize scripts, or somethign
extremely similar for playback.

···

On 8/30/05, Phil Tomson <ptkwt@aracnet.com> wrote:

Bret,

I guess this is a good problem to have :wink:

I also wonder if maybe something like the new
MouseHole proxy could be used to capture communication between browser and
server and then 'play back' the interactions somehow.

Phil

Phil, I've actually started, restarted, unwritten, and am writing again,

--
===Tanner Burson===
tanner.burson@gmail.com
http://tannerburson.com <---Might even work one day...

(Dave Burt) #6

Phil wrote:

Also: my understanding is that Watir works only on IE because it uses
Win32OLE. Any thoughts about creating a cross-browser solution (maybe
kind of like Selenium)?

It uses the IE COM and HTML-DOM. This provides end-user-level testing.

I also wonder if maybe something like the new
MouseHole proxy could be used to capture communication between browser and
server and then 'play back' the interactions somehow.

Yes, this would be useful, but IMO this kind of tool would best be used in
conjuction with a browser runner like Watir (assuming that the application
is going to be used by IE users).

Cheers,
Dave

(Bret Pettichord) #7

Why not point people to this list when they have general Ruby questions?

Well, part of the problem is that they don't know what part of their question is Ruby and what part is Watir. Often they are mixed up, even though the solution is just learning more about Ruby or some other Ruby library other than Watir.

Please let me know whether you want these kinds of mixed up questions on this list. Remember, testers are used to being beat up by developers, and will be reticent. I know this is a polite list, but i guess i want more reassurance that this kind of thing would be welcome here.

Also: my understanding is that Watir works only on IE because it uses
Win32OLE. Any thoughts about creating a cross-browser solution (maybe
kind of like Selenium)?

We've given some thought to eventually being able to generate Selenium scripts from Watir scripts, thus allowing for the cross-browser solution. This would amount to the moral equivalent of a cross-compiler. You'd develop on Windows, but then could create a script that would run on other browsers and platforms.

Several people have looked at using Mozilla's XCOM, but not much is really hooked up to on Mozilla's side yet, so that is a big project.

···

At 02:56 PM 8/30/2005, Phil Tomson wrote:

_____________________
  Bret Pettichord
  www.pettichord.com

(James Britt) #8

Bret Pettichord wrote:

···

At 08:40 AM 8/30/2005, James Britt wrote:

I don't think I really have time to follow another mailing list, but I'd like to turn this code over to someone on the Watir team if they think it useful.

Sounds cool! I would be interested to take a look at your code and see if i can find an owner for it.

Very good. I'll make some time to bundle up what I have, with some sort of documentation, and send it off to you in the next few days.

James

--

http://www.ruby-doc.org - The Ruby Documentation Site
http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML
http://www.rubystuff.com - The Ruby Store for Ruby Stuff
http://www.jamesbritt.com - Playing with Better Toys

(Bret Pettichord) #9

This problem with this approach is that Watir is in-browser and specifically can trigger events that will only hit javascript and not trigger server calls. Or the the javascript will be turned into a completely unrelated server call (as happens with ajax). Watir is good for testing java-script intensive apps. These are exactly the apps that proxy-based recording will fail on.

There is a project to create a recorder for Watir (called WatirMaker) that is actually trapping javascript events. I think this will be a more promising approach.

Bret

···

At 04:36 PM 8/30/2005, Dave Burt wrote:

> I also wonder if maybe something like the new
> MouseHole proxy could be used to capture communication between browser and
> server and then 'play back' the interactions somehow.

Yes, this would be useful, but IMO this kind of tool would best be used in
conjuction with a browser runner like Watir (assuming that the application
is going to be used by IE users).

_____________________
  Bret Pettichord
  www.pettichord.com

(Dave Burt) #10

Bret wrote:

Please let me know whether you want these kinds of mixed up questions on
this list. Remember, testers are used to being beat up by developers, and
will be reticent. I know this is a polite list, but i guess i want more
reassurance that this kind of thing would be welcome here.

(and to wtr-general:)

...
Ruby is a general purpose scripting language and there are a lot more
people available to answer such general questions on the
ruby-talk@ruby-lang.org mailing list.

Such questions are also welcome here, but if your question is not getting
answered you may want to ask on the other list.
...

This list loves ruby nubies. You've done well in your message to direct them
here.

We've given some thought to eventually being able to generate Selenium
scripts from Watir scripts, thus allowing for the cross-browser solution.
This would amount to the moral equivalent of a cross-compiler. You'd
develop on Windows, but then could create a script that would run on other
browsers and platforms.

Sounds like fun.

Cheers,
Dave

(David Brady) #11

Dave Burt wrote:

This list loves ruby nubies.

...They're DELICIOUS!

Seriously, this list and the #ruby-lang channel on freenode are wonderful. I've been programming for 20 years and picked up Ruby this Spring. There are a lot of stupid questions you have to ask to get out of the "baby-talk" phase in any language, and the main advantage of my 20 years' experience is that I generally know a question is stupid before I have to ask it. :slight_smile: I have found this list and the IRC channel to be profoundly lacking in "elitist snobbery".

So, yes. Bring them on. Some will be content to stay close to the watir documentation, but others will grow into Ruby from there.

"You mean there's a whole programming language based on Watir?!?" :wink:

-dB

···

--
David Brady
ruby_talk@shinybit.com
I'm feeling really surreal today... OR AM I?