[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).

http://selenium-grid.openqa.org/

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/

  @selenium.stop
end

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.

HTH
--
Joseph Wilk
http://www.joesniff.co.uk


More information about the rspec-users mailing list