Safari Watir / Webdriver - reasons for choosing watir or selenium...

190 views
Skip to first unread message

qalady

unread,
Aug 1, 2011, 7:50:47 PM8/1/11
to Watir General
Hello Folks,

I have been tasked to select our functional, web automation tool. I am
of course biased towards Watir (in fact, as a long time fan/promoter
I've already been moving in this direction for a few days) but our
current project is in Grails/Groovy and there is a Selenium plugin
that already exists.

The top browsers we would like to support are: IE, Firefox and Safari.
There is a big push towards Safari as that is also the default browser
for mobile applications for the iphone.

My question is: How robust/functional is Safari Watir these days? Can
I tell my team/superiors not to worry that our "Watir" scripts will
work with Safari via SafariWatir? I'm nervous that this is not the
case. I know I can probably get some basic scripts working...but where
will it break down?

Does Webdriver cover Safari? (Webdriver is new since I've been back to
watir/ruby scripting).

Not supporting the Safari browser well could break my ability to
choose Watir. Please advise.

Are there any other gotchas that anyone else can see base on my
scenario?

Thanks for your help,
Lauren



Jari Bakken

unread,
Aug 1, 2011, 8:01:49 PM8/1/11
to watir-...@googlegroups.com
WebDriver does not support Safari at the moment, but it does support
driving the browsers on iPhone and Android, either in the simulator or
on actual devices (though I haven't used either extensively, so not
sure how fast or full-featured they are).

WebDriver also has excellent support for Google Chrome, which like
Safari is based on the WebKit browser engine.

> --
> Before posting, please read http://watir.com/support. In short: search before you ask, be nice.
>
> watir-...@googlegroups.com
> http://groups.google.com/group/watir-general
> watir-genera...@googlegroups.com

Željko Filipin

unread,
Aug 2, 2011, 4:21:36 AM8/2/11
to watir-...@googlegroups.com
On Tue, Aug 2, 2011 at 1:50 AM, qalady <lau...@protopc.com> wrote:
> My question is: How robust/functional is Safari Watir these days?

I think this speaks for itself:


To make it clear, the last commit was almost a year ago. SafariWatir works, but it is not in active development.

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host

Alister Scott

unread,
Aug 2, 2011, 8:28:37 AM8/2/11
to watir-...@googlegroups.com
I think the iOS driver for webdriver is definitely not ready for prime time. For example, you can't even do a .click!!! http://code.google.com/p/selenium/issues/detail?id=1250

That issue has been open, and not looked at, since 1 Feb. Judging from that, I don't see if the iOS webdriver is considered very important.

qalady

unread,
Aug 4, 2011, 1:40:09 PM8/4/11
to Watir General

Thank you very much for the feedback.

So, to summarize what I think I am hearing:

1. Webdriver does not support Safari
2. Webdriver does support mobile browser testing - but just barely
(as .click is not even working well at this point)
3. WatirSafari "works" but has been out of development for at least a
year. It's not really clear on where
or how it will start to break down.

I did look up web browser statistics on W3C site: (
http://www.w3schools.com/browsers/browsers_stats.asp )
and it looks like Safari is only around 3% of all browser users which
is just slightly above Opera. I was surprised the usage stats were so
low.

So...now what...? I've spent the last few days thinking that as much
as I didn't want to switch to Selenium, that switching just might be
the responsible thing to do for my company. I've been reading/
researching more about Selenium and how to get started. I have some
useful resources now...but I am worried about the "ramp up time". I am
only considering Selenium RC (not the ide). With Watir, I can
continue writing scripts today. With Selenium, it will be slow going
to set up the environment, and learning how to structure the test data
(page objects), read all the preliminary material and then sheepishly
start to write my first test scripts (I would work in Java). It seems
painful, but if in the end, it's going to be a better investment,
better go ahead and jump in now, right?

Can anyone tell me something that would stop me from pursuing Selenium
and keep me feeling confident about having chosen Watir? (Please!) Is
there anything that Watir can do that Selenium can't? At this point,
even though I'm a personal fan of Watir and adore (and depend) on the
community that comes with it...I'm feeling like Watir is starting to
fall behind and Selenium is starting to become the more dominant tool
choice. As much as I personally want to select Watir as the tool of
choice for my company...it seems to not hold up against Selenium when
I discuss this with management. (Most other groups within the company
are using some combination of tools that include Selenium)

Hoping to hear a reason to stay with Watir for my work project,
Lauren

jw

unread,
Sep 27, 2011, 7:09:14 PM9/27/11
to Watir General
I have recently switched from a very successful (albeit IE 6-8 only)
Watir suite to watir-webdriver (WW). It has been very painful and
disillusioning but i'm getting close to back where I was 3 weeks
ago.

Of course my reason was to be able to test all the browsers under
(almost) the same code with the expectation that there would be a few
places like ULing/DLing files that I may have to use some case
statements on OS or browser flavor. I had been on ruby 1.8.6 and had
to install 1.8.7 which involved getting rvm or pik (maybe wasn't
necessary but seemed the easiest path). installing WW and getting to
bring up a window was pretty simple, but what I meant by
disillusioning was 1-finding out it didn't support Safari, which was
apparently a bad assumption (clearly I thought it a safe one), and 2-
having to account for WW's seeming inability to discern when the
browser was loaded. This was one of my favorite things about Watir
was it's (in my experience) reliable reliance on IE to determine that
the page was fully loaded. No more wait statements! Well, with WW
you're going to have to wrap your calls with wait methods, and if you
wrote a lot of bare click/set/select statments you'll be doing a lot
of wrapping (or overriding of lib methods to include wrapping in wait
stmts). I don't regret moving to WW, but it did suck, and it does
frustrate me about the wait, and it's way, WAY slower than watir
(hopefully some refactoring will help this).

jw

unread,
Sep 30, 2011, 2:14:12 PM9/30/11
to Watir General
I just found out that with selenium webdriver you can create/increase
the implicit wait. I think this could significantly reduce the manual
waiting and help me with all my wrapped click/set/etc. methods...

http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/WebDriver.Timeouts.html
Reply all
Reply to author
Forward
0 new messages