Ocra "Watir::Safari was not loadable"

0

I get this error but my script does not use safariwatir at all... My script completes and I get given the "test run options:" but I dont know how to get at the executable file, where is it left? How can I resolve this error?

Test run options: --seed 3036
=== WARNING: Watir::Safari was not loadable
path/to/gems/1.9.1/gems/rautomation-0.6.3/lib/rautomation/adapter/autoit/window.rb:20:in `initialize': unknown OLE server: `AutoItX3.Control' (WIN32OLERuntimeError)
HRESULT error code:0x800401f3
  Invalid class string

plus loads of random stuff you dont want to read.
.
.
.

What does it normally look like when it completes an ocra file?

The error is produced by this code:

require 'watir'
browser = Watir::IE.new
browser.goto("www.amazon.co.uk")
if browser.text.downcase.include?("books")
puts "Woooooohooo"
else 
puts "not found"
end
sleep 10

Im using ruby 1.9.2, Watir 2.0.1. IE 8 on windows XP but have tried it with Watir 1.9.2 as well and I get the same problem.

ruby
watir
rautomation
asked on Stack Overflow Aug 9, 2011 by Benjamin • edited Apr 3, 2012 by Yan Sklyarenko

2 Answers

0

The error you are getting gives the problem as being part of the Rautomation (or possibly 'autoit') Gem. Have you tried updating that Gem?

0

It seems that ocra is too eager to load everything. This code should not execute by default, but it seems that ocra doesn't care of all the "autoload" statements and will load these files nevertheless. If you can't prevent it anyway, then make sure that also the AutoItX3.dll is packaged with your generated .exe file and is relatively in the same path as it is in RAutomation gem. Check the path/to/gems/1.9.1/gems/rautomation-0.6.3/lib/rautomation/adapter/autoit/window.rb:18. But is it a warning or a fatal error?

Also, seeing that it wants to load SafariWatir, then i'm pretty sure that ocra will try to load every file, even if it should be "autoloaded".

answered on Stack Overflow Aug 12, 2011 by Jarmo Pertman

User contributions licensed under CC BY-SA 3.0