Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Watir issue with AutoIt on Vista 64 bit

Reply
Thread Tools

Watir issue with AutoIt on Vista 64 bit

 
 
Joe Dimauro
Guest
Posts: n/a
 
      03-27-2010
Installed Watir (v1.6.5) on top of Ruby (v1.8.6) on my 32bit WinXP and
64 bit Vista systems. Ran into way too many issues trying to use Ruby
1.9.1 (64-bit) and Watir(v1.6.5), so degraded to try these older
versions, as Watir site recommends.

Are versions of Watir (v1.6.5) and Ruby (v1.8.6) for Vista 64-bit
available? If so where?

This is the four line program that run OK on 32bit XP, but fails on 64
bit Vista.

require 'Watir'
browser=Watir::Browser.new
browser.minimize # Fails on this line
browser.close

Here's the irb session on the 64-bit Vista system:

C:\>irb
irb(main):001:0> require 'Watir'
=> true
irb(main):002:0> browser=Watir::Browser.new
=> #<Watir::IE:0x4c98a5c url="about:blank" title="">
irb(main):003:0> browser.minimize
WIN32OLERuntimeError: unknown OLE server: `AutoItX3.Control'
HRESULT error code:0x800401f3
Invalid class string
from
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie.rb:114:in
`initialize'
from
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie.rb:114:in `new'
from
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie.rb:114:in
`autoit'
from
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:438:in
`autoit'
from
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:435:in
`set_window_state'
from
C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie-class.rb:416:in
`minimize'
from (irb):3
irb(main):004:0> exit


FYI: Here's the output from gem's env command:
C:\>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.6
- RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
- INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8
- RUBY EXECUTABLE: C:/Ruby/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Ruby/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mswin32-60
- GEM PATHS:
- C:/Ruby/lib/ruby/gems/1.8
- C:/Users/Me/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/

Here's relevant definition from the Watir file: ie-class.rb

414 # Minimize the window (appears as icon on taskbar)
415 def minimize
416 set_window_state :SW_MINIMIZE
417 end


434 def set_window_state(state)
435 autoit.WinSetState title, '', autoit.send(state)
436 end
437 def autoit
438 Watir::autoit
439 end

Here's relevant definition from the Watir file: ie.rb:

108 def self.autoit
109 unless @@autoit
110 begin
111 @@autoit = WIN32OLE.new('AutoItX3.Control')
112 rescue WIN32OLERuntimeError
113 _register('AutoItX3.dll')
114 @@autoit = WIN32OLE.new('AutoItX3.Control')
115 end
116 end
117 @@autoit
118 end
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoIt: Regarging AutoIt usage with Firefox Anukul Singhal Ruby 4 06-17-2009 08:08 PM
AutoIt: HWnd function of AutoIt giving method missing error Anukul Singhal Ruby 6 07-13-2008 02:54 PM
autoit::watir outlook web access login pop up Devabrat Kumar Ruby 0 06-09-2008 12:14 PM
Watir: How to return a Watir::IE object for an existing IE? Anukul Singhal Ruby 1 05-15-2008 04:57 PM
Issue with ControlSend function using AutoIT in Ruby Skye Weir-Mathews Ruby 5 08-06-2007 06:51 PM



Advertisments