Try making IE a member of Portal. I ran into a similar type of problem
- after an upgrade my scripts wouldn't work. Someone here recommended
that instead of my class extending IE to make IE a member of my class.
Did that and then my scripts started working again.

On Feb 4, 2:21 pm, Brian Tomlin <[email protected]> wrote:
> I have an old script that extends the IE class. Here are the first few
> lines:
>
> require 'rubygems'
> require 'watir'
>
> include Watir
>
> class Portal < IE
>
> This use to work fine before, but I have recently updated to Watir
> 1.6.2 (running with Ruby 1.8.6 on XP) and it no longer works. When I
> try to require my Portal class I get the following stack trace:
>
> C:/Ruby/lib/ruby/gems/1.8/gems/windows-pr-0.9.3/lib/windows/thread.rb:
> 59: uninit
> ialized constant Windows::API::Error (NameError)
>         from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> 31:in `ge
> m_original_require'
>         from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> 31:in `re
> quire'
>         from C:/Ruby/lib/ruby/gems/1.8/gems/win32-process-0.5.9/lib/
> win32/proces
> s.rb:3
>         from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> 31:in `ge
> m_original_require'
>         from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> 31:in `re
> quire'
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-
> process.rb:
> 1
>         from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> 31:in `ge
> m_original_require'
>         from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> 31:in `re
> quire'
>         from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
> ie.rb:45
>         from ./portal.rb:20
>         from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> 31:in `ge
> m_original_require'
>         from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> 31:in `re
> quire'
>         from C:/eclipse/workspace/tests/watir/portal/
> report_test_setup.rb:3
>
> On portal.rb line 20 I am attempting to extend the IE class. On
> report_test_setup.rb 3 I am requiring my Portal class.
>
> Any idea why this wouldn't work now? Do I just need to try
> reinstalling Ruby and Watir?
>
> Thanks,
> Brian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to