Hello,

I have a test case below:

1. Open IE browser window, change the language setting using autoit.  Then, 
close the window.
2. Open a web page in IE to do a sample testing.  Then, close IE window.
3. Open IE browser window, reset the language setting using autoit.  Then, 
close the window.

The code for step 1 is:
ie = Watir::IE.new
autoit = WIN32OLE.new('AutoItX3.Control')

autoit.WinWaitActive("Blank Page - Windows Internet Explorer provided by 
Yahoo!")
autoit.Send ("!to")   #sends Alt T (Tools) and O (options) to open Internet 
Options
autoit.WinWaitActive("Internet Options")
autoit.Send ("!l")
autoit.Send ("!a")
…

When running the script for step 1 and 2, the setps get completed fine.  

But, at step 3, received error message and IE browser is not open: 
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1570:in 
`initialize': failed to create WIN32OLE object from 
`InternetExplorer.Application' (WIN32OLERuntimeError)
    HRESULT error code:0x80004002
      No such interface supported       from 
C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1570:in `new'
        from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1570:in 
`create_browser_window'
        from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1164/./watir.rb:1477:in 
`initialize'
        from C:/depot/eng/bedrock/active/qa/all/cc/qa/Ruby/test.rb:51:in `new'
        from C:/depot/eng/bedrock/active/qa/all/cc/qa/Ruby/test.rb:51

Step3 is very similar to the step1. Why it is working in step 1, but not 
working in step 3?  Please help!
Thanks.
Kui
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to