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.
How to Run SAHI with Ruby?
Hi, I have been using SAHI for couple of months with javascript language. However, I was wondering if we could use it with ruby language as well. I've been also trying ruby with watir but i want to give a shot with sahi and see how efficient it is. Can you please explain in article how to execute the ruby script with sahi?
If you could do that, that would be great.
Thanks
Ash
If you could do that, that would be great.
Thanks
Ash
Comments
I tried to run the sample script after starting the sahi pro proxy. I got this 'Can't find Random Device' Error message. Can you help me on that?
Loaded suite sahiruby
Started
E
Finished in 1.046835 seconds.
1) Error:
test_google(SahiDriverTest):
RuntimeError: Can't find random device
C:/Ruby192/lib/ruby/gems/1.9.1/gems/guid-0.1.1/lib/guid.rb:75:in `initialize'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sahi-1.0.1/lib/sahi.rb:84:in `new'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/sahi-1.0.1/lib/sahi.rb:84:in `open'
sahiruby.rb:8:in `setup'
1 tests, 0 assertions, 0 failures, 1 errors, 0 skips
Test run options: --seed 22068
Also, i see the ruby code which uses .submit code. Can we use .button instead of that?
Please reply me back at the earliest.
Thanks
Ash
class Guid
class << self
def win32?
RUBY_PLATFORM =~ /[^r]win/i
end
end
end
So please check what RUBY_PLATFORM returns on your OS, modify the guid.rb source code and run the script. It will resolve the issue.
I also faced the same issue and I have changed the platform with "RUBY_PLATFORM =~ /i386/i" and did not see this again.
Hope this will help you.
Solution is install win32-process in command line