Watir as remote library for Robot Framework?

182 views
Skip to first unread message

David

unread,
Mar 6, 2011, 4:45:58 PM3/6/11
to robotframework-users
This question just came to mind as there was some thread(s) on WatiN
integration with Robot Framework.

There's an generic remote server and example library in Ruby, so it
would seem possible to built a remote library for Watir using Ruby.

I was wondering if anyone has thought of that or actually done
something like that. I can't help in that area as I'm no Ruby expert.

Would be nice to have an alternative to Selenium for web testing with
RF.

Mark Levison

unread,
Mar 6, 2011, 5:22:26 PM3/6/11
to mang...@gmail.com, robotframework-users
David, I'll bite. I'm trying to understand why you would want
WatiN/Watir? What would either tool offer that Selenium doesn't? In
addition if they're differences would they be worth the effort of
writing a wrapper for?

To be clear I've helped past clients use WatiN and do like it.

Puzzled in Ottawa
Mark

> --
> You received this message because you are subscribed to the Google Groups "robotframework-users" group.
> To post to this group, send email to robotframe...@googlegroups.com.
> To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.
>
>

David

unread,
Mar 6, 2011, 11:01:07 PM3/6/11
to robotframework-users
No major reason than to offer choice.

Can't say for Watir, haven't used it nor done much research on it, but
did some research on WatiN & Selenium, and some people have issues
with either of the tools, and may prefer one over the other.

In my trial test, at least from executing C# code standpoint, I was up
and running much faster with WatiN than Selenium. Couldn't get
Selenium C# code to work right from the recorded test and abandoned
the effort, ended up just evaluating Selenium from the Selenium IDE
and from Robot Framework instead of C# code with NUnit. For WatiN,
using the separate WatiN Recorder, I was able to get further along
initially. In hindsight, both tools would work fine, if you tweak the
test commands (and code) to do the correct sequence of actions, and
use the correct commands, etc. as some commands don't work in some
situations. But at least from experience, I started off faster with
WatiN.

To summarize, a test framework can be limiting if the tooling support
available is limited, such is the case with current open source
frameworks, including Robot Framework (though it is not the only one).
For RF, we're restricted to using Selenium for web testing, and AutoIt
for desktop GUI testing. If those tools don't work too well for you,
or need something more, or something else, build your own test library
for RF. Which is fine of course, and the point of this thread. (On a
side note, Selenium is fine for web testing, but AutoIt may be
limiting compared to what commercial equivalents offer.)

But it would be no fun if others build such a useful library for
Watir, or WatiN, etc., and not be able to share it with others. So
everyone else who needs it needs to build their own version and re-
invent the wheel.

Janne Härkönen

unread,
Mar 7, 2011, 12:41:11 AM3/7/11
to mang...@gmail.com, robotframework-users
Hello, David

On Sun, Mar 6, 2011 at 11:45 PM, David <mang...@gmail.com> wrote:
> There's an generic remote server and example library in Ruby, so it
> would seem possible to built a remote library for Watir using Ruby.
>
> I was wondering if anyone has thought of that or actually done
> something like that. I can't help in that area as I'm no Ruby expert.

Thanks to Daniel Gregoire, this kind of wrapper using Watir-Webdriver
already exists [1].

[1] https://github.com/semperos/watir-robot

--J

--
Janne Härkönen | http://reaktor.fi
http://twitter.com/#!/janneharkonen

semperos

unread,
Mar 7, 2011, 3:03:46 PM3/7/11
to robotframe...@googlegroups.com, mang...@gmail.com
Just so you know, Watir Robot actually uses Watir-WebDriver and leverages some Java-specific functionality for which you need JRuby. I've used Watir-WebDriver since it's going to become Watir 2.0, amongst other reasons (see the readme on Github). I'm using JRuby to help with cross-platform packaging (able to use Jar files) and so that I can use certain Java libraries (e.g. taking screenshots).

Note that I've also enhanced the Ruby remote server to deliver documentation and keyword arguments using YARD, so you probably want to use that in conjunction with Watir Robot to get the most out of it: https://github.com/semperos/robot-remote-server-rb

Lastly, I've also packaged a GUI control panel that will (1) start the Ruby-based remote server automatically and (2) allows you to edit and run your tests. You can clone the source here https://github.com/semperos/watir-robot-gui and run "rake retrieve:all" followed by "rake package:setup:windows", replacing "windows" with "linux" or "osx" for whatever your platform is. I've been using this by myself on a Windows box, so if you experience any issues please use the Issues area on Github.

RF Maintainers - I've actually just needed to rename my version of the remote server in Ruby, so the URL to the source of the robot_remote_server gem is now https://github.com/semperos/robot-remote-server-rb as mentioned above. Please update the link in RobotFramework's wiki accordingly (here: http://code.google.com/p/robotframework/wiki/RemoteLibrary).


Lars Nordin

unread,
Mar 7, 2011, 3:17:26 PM3/7/11
to robotframework-users
Is there any way for either this page http://code.google.com/p/robotframework/wiki/TestLibraries o be updated,
or a new wiki page to be created to so there is a list of external libraries like this?

-----Original Message-----
From: robotframe...@googlegroups.com On Behalf Of Janne Härkönen
Subject: Re: Watir as remote library for Robot Framework?

Hello, David

On Sun, Mar 6, 2011 at 11:45 PM, David <mang...@gmail.com> wrote:

...

David

unread,
Mar 7, 2011, 4:43:50 PM3/7/11
to robotframework-users
Nice, thanks for the info Janne and semperos. Wouldn't have known if I
didn't ask via this thread, as only a Google search would have brought
that up, which I should have done as well. There's no mention of this
stuff on RF site nor this user group.

On Mar 7, 12:03 pm, semperos <daniel.l.grego...@gmail.com> wrote:
> Just so you know, Watir Robot actually uses Watir-WebDriver and leverages
> some Java-specific functionality for which you need JRuby. I've used
> Watir-WebDriver since it's going to become Watir 2.0, amongst other reasons
> (see the readme on Github). I'm using JRuby to help with cross-platform
> packaging (able to use Jar files) and so that I can use certain Java
> libraries (e.g. taking screenshots).
>
> Note that I've also enhanced the Ruby remote server to deliver documentation
> and keyword arguments using YARD, so you probably want to use that in
> conjunction with Watir Robot to get the most out of it:https://github.com/semperos/robot-remote-server-rb
>
> Lastly, I've also packaged a GUI control panel that will (1) start the
> Ruby-based remote server automatically and (2) allows you to edit and run
> your tests. You can clone the source herehttps://github.com/semperos/watir-robot-guiand run "rake retrieve:all"
> followed by "rake package:setup:windows", replacing "windows" with "linux"
> or "osx" for whatever your platform is. I've been using this by myself on a
> Windows box, so if you experience any issues please use the Issues area on
> Github.
>
> RF Maintainers - I've actually just needed to rename my version of the
> remote server in Ruby, so the URL to the source of the robot_remote_server
> gem is nowhttps://github.com/semperos/robot-remote-server-rbas mentioned

Pekka Klärck

unread,
Mar 7, 2011, 6:44:56 PM3/7/11
to daniel.l...@gmail.com, robotframe...@googlegroups.com, mang...@gmail.com
2011/3/7 semperos <daniel.l...@gmail.com>:

>
> Just so you know, Watir Robot actually uses Watir-WebDriver and leverages
> some Java-specific functionality for which you need JRuby. I've used
> Watir-WebDriver since it's going to become Watir 2.0, amongst other reasons
> (see the readme on Github). I'm using JRuby to help with cross-platform
> packaging (able to use Jar files) and so that I can use certain Java
> libraries (e.g. taking screenshots).

First of all, thanks a lot for creating and releasing this cool
library! As David commented in his mail, it's really good to have
choice.

We hadn't added a note about this library to the project pages earlier
because it wasn't officially release. I now added it
tohttp://code.google.com/p/robotframework/wiki/TestLibraries and will
also add a news item into the project front page.

> Note that I've also enhanced the Ruby remote server to deliver documentation
> and keyword arguments using YARD, so you probably want to use that in
> conjunction with Watir Robot to get the most out of it:
> https://github.com/semperos/robot-remote-server-rb

This is a really cool project too. I really like how the simple Ruby
version of the remote server we created has been enhanced. The new
features and better packaging (gems are really nice) definitely eases
using Robot in Ruby world. I hope it also encourages more people to
create test libraries that utilize Ruby based tools.

> Lastly, I've also packaged a GUI control panel that will (1) start the
> Ruby-based remote server automatically and (2) allows you to edit and run
> your tests. You can clone the source here
> https://github.com/semperos/watir-robot-gui and run "rake retrieve:all"
> followed by "rake package:setup:windows", replacing "windows" with "linux"
> or "osx" for whatever your platform is. I've been using this by myself on a
> Windows box, so if you experience any issues please use the Issues area on
> Github.

This sounds interesting. Should it be linked from the Robot pages
somehow or is it enough that watir-robot is? We actually don't have a
wiki page for external supporting tools but should definitely add one.

> RF Maintainers - I've actually just needed to rename my version of the
> remote server in Ruby, so the URL to the source of the robot_remote_server
> gem is now https://github.com/semperos/robot-remote-server-rb as mentioned
> above. Please update the link in RobotFramework's wiki accordingly (here:
> http://code.google.com/p/robotframework/wiki/RemoteLibrary).

I updated the page. I also noticed all links to the remote server at
https://github.com/semperos/watir-robot haven't yet been updated.

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

semperos

unread,
Mar 8, 2011, 7:12:29 AM3/8/11
to robotframe...@googlegroups.com, daniel.l...@gmail.com, mang...@gmail.com

First of all, thanks a lot for creating and releasing this cool
library! As David commented in his mail, it's really good to have
choice.

My pleasure. I'm actively using it, so it's not selfless :)

We hadn't added a note about this library to the project pages earlier
because it wasn't officially release. I now added it
tohttp://code.google.com/p/robotframework/wiki/TestLibraries and will
also add a news item into the project front page.

Thanks for adding it to the list. I'm sure it needs a lot of help to reach maturity, but this is a start.

This sounds interesting. Should it be linked from the Robot pages
somehow or is it enough that watir-robot is? We actually don't have a
wiki page for external supporting tools but should definitely add one.

The GUI tool isn't quite as polished. I created it so my non-developer colleagues could have an easy way to run RF tests without going to the command line and without having to install RIDE (when I started, RIDE still didn't have the nice interface it currently does for running tests, great work RIDE folks!)

I updated the page. I also noticed all links to the remote server at
https://github.com/semperos/watir-robot haven't yet been updated.

Wouldn't ya know, I go telling you to fix your links and I haven't fixed mine :) Will do shortly, thanks for noticing.

FYI: I'm putting together another remote library using the same underlying WebDriver technology (and the same keyword base) but implemented in Clojure. I'll post a link to the code here when it's more finalized, but I already have a working version of the XML-RPC server and can run keywords. I'll continue to keep up with the JRuby Watir Robot code I've written, especially if other people start using it, but I'm not quite satisfied with its Java interop story and packaging woes (for my GUI tool, specifically).

-Daniel
Reply all
Reply to author
Forward
0 new messages