My script sometimes results in following exception and I do not know how to get it stable so that it won't throw an exception. Any ideas?
W, [21-Apr-2006 16:15:28#2768]
WARN -- : frame error in waitreadyState
OLE error code:0 in
<Unknown>
<No Description>
HRESULT error
code:0x80070005
Access is denied.
c:/z/TestAuto/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1405:in
`method
_missing'
c:/z/TestAuto/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1405:in
`wait'
c:/z/TestAuto/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1404:in
`upto'
c:/z/TestAuto/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1404:in
`wait'
c:/z/TestAuto/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1744:in
`wait'
c:/z/TestAuto/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2014:in
`click'
C:/z/TestAuto/ruby/Thad.rb:375
C:/z/TestAuto/ruby/Thad.rb:358:in
`each'
C:/z/TestAuto/ruby/Thad.rb:358
Here is the script part that causes the problem:
head_page = ie.frame( "head")
#puts" Let's set all checkboxes"
accessopt_name.each do |m| ####THIS IS LINE 358
# page refreshes and looses therefore the
connection
ac_page =
ie.frame( :name, "disp").form( :name, "data_form")
if ac_page.checkbox( :name, m ).exists? then
if
ac_page.checkbox( :name, m ).enabled?() then
if
ac_page.checkbox( :name, m ).checked? then
ac_page.checkbox( :name, m).clear
ac_page.wait
puts "Cleared checkbox #{m} = #{ac_class.string(m)} "
else
ac_page.checkbox( :name, m).set
ac_page.wait
puts "Set checkbox #{m} = #{ac_class.string(m)}
"
end
if
head_page.link( :id, "Save_a").exists? then
if head_page.link( :id, "Save_a").enabled? then
head_page.link(
:id, "Save_a").click ####THIS IS LINE 375
head_page.wait
else
puts "Save button not enabled"
end
else
puts "does not exist!"
end
else
puts
"Checkbox #{m} = #{ac_class.string(m)} DISABLED! "
end
else
puts
"Error: Checkbox with name #{m} = #{ac_class.string(m)} does not exist!
"
end
end
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zeljko Filipin
Sent: Tuesday, April 25, 2006 12:57 AM
To: [email protected]
Subject: Re: [Wtr-general] OLE error code:0 exception?
http://wiki.openqa.org/display/WTR/FAQ#FAQ-Accessdeniedwhentryingtoaccessaframe
Access is denied.
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
