[rspec-users] Mulitbrowser selenium ruby

Joseph Wilk josephwilk at joesniff.co.uk
Fri Oct 24 06:39:43 EDT 2008

Togetherne Togetherne wrote:
> Anyone have any ideas on how i can do this using rspec?
We run Integration tests across multi browsers simultaneously using 
Selenium Grid. Perhaps you could use that (I believe it comes with ant 
tasks that do some of the magic).


Alternatively if you just want to run them sequentially why don't you 
write a simple wrapper script. Something like:

%w{iehta chrome}.each |browser| do
  @selenium = Selenium::SeleniumDriver.new("localhost", 4444, 
"*#{browser}","#{URL_BASE_1}", 10000);

  #go rspec go!
  # spec --format html spec/


A further note, it does seem a bit odd to have specs that touch Selenium 
if thats what you are doing. Perhaps look towards using Features and 
something like Cucumber 
http://github.com/aslakhellesoy/cucumber/tree/master rather than specs.

Joseph Wilk

More information about the rspec-users mailing list