18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Problem with Ruby Gem
Hi,
I'm using Sahi w/ a Ruby driver, and am having some initial problems getting the driver to work. I'm using Ruby 1.8.7 and Windows 7 (but have had the same problem with Ruby 1.9.2)
In a gist, here is my code:
require 'rubygems'
require 'sahi'
#I'm using IE8, note that the {at}s are supposed to be symbols
browser_path = "C:\\Program Files\\Internet Explorer\\iexplore.exe"
browser_options = "-nomerge"
{at}browser = Sahi::Browser.new(browser_path, browser_options)
{at}browser.open
In running this, I get this error:
C:/Ruby187/lib/ruby/gems/1.8/gems/guid-0.1.1/lib/guid.rb:75:in `initialize': Can
't find random device (RuntimeError)
from C:/tools/sahi/ruby/lib/sahi.rb:85:in `new'
from C:/tools/sahi/ruby/lib/sahi.rb:85:in `open'
from automate.rb:110:in `setup'
from automate.rb:120
Do you know why this happens? Or what I should be doing? Thank you.
I'm using Sahi w/ a Ruby driver, and am having some initial problems getting the driver to work. I'm using Ruby 1.8.7 and Windows 7 (but have had the same problem with Ruby 1.9.2)
In a gist, here is my code:
require 'rubygems'
require 'sahi'
#I'm using IE8, note that the {at}s are supposed to be symbols
browser_path = "C:\\Program Files\\Internet Explorer\\iexplore.exe"
browser_options = "-nomerge"
{at}browser = Sahi::Browser.new(browser_path, browser_options)
{at}browser.open
In running this, I get this error:
C:/Ruby187/lib/ruby/gems/1.8/gems/guid-0.1.1/lib/guid.rb:75:in `initialize': Can
't find random device (RuntimeError)
from C:/tools/sahi/ruby/lib/sahi.rb:85:in `new'
from C:/tools/sahi/ruby/lib/sahi.rb:85:in `open'
from automate.rb:110:in `setup'
from automate.rb:120
Do you know why this happens? Or what I should be doing? Thank you.