Try 
        require 'watir'
        ...
        @ie = Watir::IE.new 
Instead of 
        @ie = WIN32OLE.new('InternetExplorer.Application')

You could alternatively edit the setup.rb file to be for your tests anh
just require it $ie and the logger are both initialized in that file.

Also, take a look at the unittests for good usage examples.

--Mark

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Markus
Sent: Tuesday, November 14, 2006 5:58 AM
To: [email protected]
Subject: [Wtr-general] Running Watir from FoxPro 9

Has anybody tried to run a watir-script from an foxpro web application?

I get this error:
1) Error:
test_parm(Paramtest):
RuntimeError: Fail: OLE initialize
   HRESULT error code:0x80070057
     Falscher Parameter.
 
C:/Programme/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1121/./watir.rb:144
2:in `new'
 
C:/Programme/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1121/./watir.rb:144
2:in `create_browser_window'
 
C:/Programme/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1121/./watir.rb:134
7:in `initialize'
 
C:/Programme/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1121/./watir.rb:135
6:in `start'

So this line causes the error:
@ie = WIN32OLE.new('InternetExplorer.Application')

The script is run with this command:
lcScript = "C:\Programme\ruby\bin\rubyw.exe -CC:\goto\some\path\
C:\Programme\ruby\bin\fit.rb input.html output"
RUN /N &lcScript

Without the /N option nothing happens at all (not even a cryptic
unhelpfull foxpro error message).

The system is windows 2003 server, foxpro 9, ruby 1.8.4, watir
1.5.1.1121, fit 1.1.

By the way, when I issue that command in a dos box it runs with no
errors.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5247&messageID=14557#14557
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to