I am checking script for exception but got some errors can anyone help?

1

Below is the code....

require 'watir'
@ie = Watir::IE.new 
@ie.goto 'http://asdfasdf.com'

begin
    @ie.check_for_http_error 
    rescue Watir::Exception::NavigationException => e 
    puts "Page did not load: #{e}" 
end

require 'watir/contrib/page_checker'
@ie.add_checker(PageCheckers::NAVIGATION_CHECKER)

begin
   @ie.goto "http://marekj.com/asdfasdfasdfa"
rescue Watir::Exception::NavigationException => e 
   puts "Page did not load: #{e}" 
end

I run above code but it is showing an error message:

c:/ruby192/lib/ruby/gems/1.9.1/gems/watir-2.0.3/lib/watir/page-container.rb:12:in `method_missing': (in OLE method `navigator': ) (WIN32OLERuntimeError)
OLE error code:80070005 in <Unknown>
  Access is denied.

HRESULT error code:0x80020009
  Exception occurred.
    from c:/ruby192/lib/ruby/gems/1.9.1/gems/watir-2.0.3/lib/watir/page-container.rb:12:in `check_for_http_error'
    from xception.rb:7:in `<main>'

How can I fix this?

ruby
http
exception
watir
asked on Stack Overflow Oct 31, 2011 by Paddy M • edited Oct 31, 2011 by Polynomial

1 Answer

1

Access is denied. error message is usually a problem with frames. Google for that error message.

answered on Stack Overflow Oct 31, 2011 by Ċ½eljko Filipin

User contributions licensed under CC BY-SA 3.0