(Fire|)Watir and Selenium - Google SoC

Hi!

I’ve got a project to come up with a way to record user action in Ruby
code that can be executed by FireWatir. My idea is to parse the output
from TestGen4Web or Selenium-IDE. This idea was proposed in the ruby-
talk mailing list and in the Ruby Central SoC ideas page.

There is one thing though: what makes that different from just using
Selenium-IDE? Selenium can record, it can output Ruby code, and it can
then play it back in the browser.

I had read that Selenium had to be installed server-side, but then I
read that with Selenium-IDE being a Firefox extension it becomes a
trusted host and can run its own webserver and test any website it
wants.

So would this idea be redundant? Is there any substantial difference
between Selenium and (Fire|)Watir that would justify doing this?

My application can be seen at
http://www.students.ic.unicamp.br/~ra033245/soc_ruby.txt
if anyone’s interested.

Thanks a lot!

Best,

Helder

On 3/29/07, Helder R. [email protected] wrote:

Hi!

I’ve got a project to come up with a way to record user action in Ruby
code that can be executed by FireWatir. My idea is to parse the output
from TestGen4Web or Selenium-IDE. This idea was proposed in the ruby-
talk mailing list and in the Ruby Central SoC ideas page.

Why not just use WATIR Recorder?

On Mar 29, 9:33 am, “Helder R.” [email protected] wrote:

read that with Selenium-IDE being a Firefox extension it becomes a
trusted host and can run its own webserver and test any website it
wants.

So would this idea be redundant? Is there any substantial difference
between Selenium and (Fire|)Watir that would justify doing this?

Let me make some alternate suggestions for how to you could help
support web testing in Ruby.

  1. Help create a Watir-api to selenium. Many people like watir’s API,
    but prefer Selenium’s platform support. Here is a spike of the
    concept:
    http://awta.wikispaces.com/Common+Driver+for+Selenium+and+Watir

  2. Help with the FireWatir port of Watir. We are running into some
    inconsistencies between FireWatir and Watir::IE (aka Watir). See the
    FireWatir mailing list for details. These are a problem for people who
    want to run tests using either browser.

  3. Help integrate FireWatir, Watir::IE and SafariWatir. Right now they
    are separate tools, but by rights they really should share common
    code. We’ve had some discussion of this, and have agreed on basic
    principles, but no one has really had the time to do it.

  4. I do think that Modifying Selenium IDE so that it could generate
    Watir code would also be a benefit.

  5. You should know that the Watir-recorder team recently released
    their Watin Recorder – there may be things to learn there.

All in all, what we really need is not yet another tool, but rather
help in getting these different open-source tools to work together and
interoperate.

It might also simply help to provide up-to-date comparison information
on Watir vs. Selenium. Several have been done, but they are all over a
year old (that i’ve seen) and all the tools have improved
substantially in that time.

Bret

On Mar 29, 2:00 pm, “Richard C.” [email protected] wrote:

On 3/29/07, Helder R. [email protected] wrote:

Hi!

I’ve got a project to come up with a way to record user action in Ruby
code that can be executed by FireWatir. My idea is to parse the output
from TestGen4Web or Selenium-IDE. This idea was proposed in the ruby-
talk mailing list and in the Ruby Central SoC ideas page.

Why not just use WATIR Recorder?

I couldn’t find much anything on Watir Recorder except for the svn and
I thought it wasn’t in active development. Still, I don’t know how it
works but it must be a tool for IE and the original Watir (that runs
only on IE). It mustn’t work on Firefox and FireWatir. I’ll look into
it though as there might be some interesting things to learn from
there, as Bret said on his answer.

A few notes in reply…

On Mar 29, 11:10 pm, “Helder R.” [email protected] wrote:

Hi Bret! Thanks for answering. My initial intention was to send this
to you, then I decided to open it up here. Ended up getting both.
Comments follow.

Frankly, you are probably more likely to get a prompt response
(relatively prompt, that is) posting here, rather than to me directly.

  1. Help with the FireWatir port ofWatir. We are running into some
    inconsistencies between FireWatir andWatir::IE (akaWatir). See the
    FireWatir mailing list for details. These are a problem for people who
    want to run tests using either browser.

Is this being discussed in theWatir-general list? That’s the only one
I found. If there’s one specific for FireWatir please show me where.

The firewatir list is hosted on Google.

  1. You should know that theWatir-recorder team recently released
    their Watin Recorder – there may be things to learn there.

Thanks for the heads up. All I could find was a short release note.
There seems to be close to no documentation at all. Do you know if
there is any outside the openqa website? Do you know what’s the
difference between WatiR Recorder and WatiN Recorder?

The Watir recorder creates Watir scripts. The first version was in C#,
but it was ported to ruby. The Watin recorder creates Watin Scripts.
Watin is .Net. They same team created both of these. They seem to have
used Watir for a while, but now seem to be focusing on Watin and the
Watin recorder.

This really seems like the way to go. As I’m new to everything
concerning these tools, I really needed some light to see if I was
getting it right. The project still seems relevant, but there’s a lot
more I hadn’t thought of. Thanks for the broader view.

Now, do you think any of the ideas you gave has greater priority and
should be done before the Selenium-IDE-outputs-Watir-code idea? I
don’t know if I can change my application objectives in mid-flight,
but if there’s something that’s more urgent for the community and that
still can be done in 3 months, I’d love to make it work.

I think you need to make up your own mind on this.

something.
Well, actually this is really the thing that you should put at the top
of your list. Several years ago, I was researching open source testing
tools and collected my findings in a set of lecture notes called
Homebrew Test Automation (use google if you want to find it). In a
way, they were the research I needed to do first before deciding to
commit myself both to Watir as well as to support the release of
Selenium (which I helped launch).

Many people have some of the same questions as you, but communities
have been diverging (Selenium, Watir, Watin…) and as each of the
tools has become more featured and more complex and overcome earlier
shortcomings, no one really knows where the different tools really
stand right now. I have a rough idea, but am really just trying to
keep the Watir community (Watir for IE, SafariWatir, FireWatir,
MineralWatir) from diverging.

Bret

Hi Bret! Thanks for answering. My initial intention was to send this
to you, then I decided to open it up here. Ended up getting both.
Comments follow.

On Mar 29, 10:46 pm, “Bret P.” [email protected] wrote:

Selenium-IDE? Selenium can record, it can output Ruby code, and it can
Let me make some alternate suggestions for how to you could help
support web testing in Ruby.

  1. Help create a Watir-api to selenium. Many people like watir’s API,
    but prefer Selenium’s platform support. Here is a spike of the
    concept:http://awta.wikispaces.com/Common+Driver+for+Selenium+and+Watir

This idea goes very well with number 4 (which is the SoC application
itself). If Watir and Selenium end up having a common back-end with
different APIs, it’d be good to have Selenium-IDE output Watir code
that could then drive Selenium without breaking already-existing Watir
code.

And as Selenium-IDE already outputs Selenium code, the process of
transforming its output into Watir code might shed a light on how to
accomplish the idea of a Watir API to Selenium.

  1. Help with the FireWatir port of Watir. We are running into some
    inconsistencies between FireWatir and Watir::IE (aka Watir). See the
    FireWatir mailing list for details. These are a problem for people who
    want to run tests using either browser.

Is this being discussed in the Watir-general list? That’s the only one
I found. If there’s one specific for FireWatir please show me where.

  1. Help integrate FireWatir, Watir::IE and SafariWatir. Right now they
    are separate tools, but by rights they really should share common
    code. We’ve had some discussion of this, and have agreed on basic
    principles, but no one has really had the time to do it.

This seems indeed reasonable and desirable. But I feel like it would
be too big of a bite for me to chew right now. If I get approved for
this SoC project (, ) I will be a lot more familiar with
these tools and codebases and might have a better idea of how I can
take this next step. Maybe a SoC for next year? :slight_smile:

  1. I do think that Modifying Selenium IDE so that it could generate
    Watir code would also be a benefit.

See #1.

  1. You should know that the Watir-recorder team recently released
    their Watin Recorder – there may be things to learn there.

Thanks for the heads up. All I could find was a short release note.
There seems to be close to no documentation at all. Do you know if
there is any outside the openqa website? Do you know what’s the
difference between WatiR Recorder and WatiN Recorder?

All in all, what we really need is not yet another tool, but rather
help in getting these different open-source tools to work together and
interoperate.

This really seems like the way to go. As I’m new to everything
concerning these tools, I really needed some light to see if I was
getting it right. The project still seems relevant, but there’s a lot
more I hadn’t thought of. Thanks for the broader view.

Now, do you think any of the ideas you gave has greater priority and
should be done before the Selenium-IDE-outputs-Watir-code idea? I
don’t know if I can change my application objectives in mid-flight,
but if there’s something that’s more urgent for the community and that
still can be done in 3 months, I’d love to make it work.

It might also simply help to provide up-to-date comparison information
on Watir vs. Selenium. Several have been done, but they are all over a
year old (that i’ve seen) and all the tools have improved
substantially in that time.

Tell me about it. I’ve been rushing through old blog posts, old
tutorials, old everything about them to get a grasp about what makes
them different and when I think I’ve nailed it I find something a bit
more recent (but still old) aying it’s all changed. I’ll start
documenting my findings and then I’ll try sum it up on a blog post or
something.

Cheers,

Helder