[ruby] State of Selenium for Rails

8 views
Skip to first unread message

darren.hinderer

unread,
Mar 11, 2010, 2:10:58 AM3/11/10
to Selenium Users
I'm a long time selenium_on_rails plugin user, and I've setup some
Java projects with Selenium RC. So I understand the RC concept, I've
just never used it with Rails before.

Anyway, I feel lost as to what the newish Ruby page is trying to
convey, and to what I should use for future projects:
http://seleniumhq.org/projects/ruby/

My first guess would be that selenium-rails is the right choice
because it includes the server and fits somewhat into the pattern that
I'm used to from selenium_on_rails.

But then I started looking at Webrat because it is well supported by
the Ruby community, and it uses the selenium-client. And it turns out
that the selenium client has a different author then the selenium-ruby/
rails and quite possibly entirely different philosophies.

Can someone point me in the right direction?

Thanks,
--
Darren

Scott

unread,
Mar 11, 2010, 10:29:04 PM3/11/10
to Selenium Users
I have a few notes here http://scottcsims.com/wordpress/?p=86

On Mar 11, 1:10 am, "darren.hinderer" <darren.hinde...@gmail.com>
wrote:

darren.hinderer

unread,
Mar 13, 2010, 4:15:10 PM3/13/10
to Selenium Users
I got some clarity on this from Chad Woolley. The selenium-client gem
is the only Ruby library that is currently being maintained. Both the
Selenium gem (labeled Selenium Ruby on the seleniumqa.org) and the
selenium-rails gem should no longer be used.

From a little poking around in the github source I found that the
selenium-client gem contains the RC server jar even though the project
description does not mention it. Webrat makes using the selenium-
client for Rails integration tests a breeze, and it turns out, was the
answer I was looking for.

Setting up Webrat in selenium mode was not entirely straight forward
even though it has been around for a while. I thought I should share
the recipe that worked for me on Ubuntu.

First install Java if you don't have it already:
sudo apt-get install sun-java6-jre

In your environment.rb file declare the gem dependencies:
config.gem "selenium-client", :lib => "selenium"
config.gem "database_cleaner"

Then install them:
sudo rake gems:install

And in test/test_helper.rb I left transactional_fixtures set to true
so that the unit and functional tests would remain speedy. Just add
the following to the bottom of that file to modify the integration
tests only.

http://pastie.org/868291

Enjoy!
--
Darren


On Mar 10, 11:10 pm, "darren.hinderer" <darren.hinde...@gmail.com>
wrote:
> I'm a long timeselenium_on_railsplugin user, and I've setup some

Darren Hinderer

unread,
Mar 21, 2010, 9:49:27 PM3/21/10
to Selenium Users
This weekend I did some more looking around and ran into the Ruby
library capybara.
http://github.com/jnicklas/capybara

From its README I discovered that there is a Selenium 2 under
development. It is being created out of the merger of something called
WebDriver and Selenium RC. It turns out that this somewhat old news,
although I think it is worth mentioning here since seleniumhq says
nothing of it.
http://google-opensource.blogspot.com/2009/05/introducing-webdriver.html

capybara doesn't use the selenium-client gem like webrat, but instead
works with the selenium-webdriver gem. So I guess you could say that
capybara uses the Selenium of the future. There is a google group for
capybara, and one of the topics talks about the possibility of webrat
and capybara merging.

--
Darren

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

Reply all
Reply to author
Forward
0 new messages