|
Hello Listfolk. Searching the archives, I noticed that there were some
threads about these WIN32OLERuntimeErrors. Here’s another one to add to the pile. I will try rebooting my system to see if that resolves most
of the issues, but I wanted to alert folks about this test case as well. Background Info ----------------------- I’m using the Watir 1.4.1 gem under Ruby 1.8 on a WinXp
Pro box. I’m seeing the errors when I try to access a link.
This happens some of the time, but not all of the time. Its typical for me, that when I get one of these errors, the
same error will appear in other neighboring test cases as well. Then for some
reason, the tests start to run fine again. I’m running my tests under the unit test framework.
The tests usually run fine, but once in a while I’ll get the
WIN32OLERuntime error to appear to an unknown reason. My basic structure is
the 1st test case will log the user into the system. The teardown
script places the user at a known place in the system, and all the test cases
will start from this known state. The Error Messages Seen -------------------------------------- test_030_AddAnotherGroup(RubyTester): WIN32OLERuntimeError: innerText OLE error code:0 in <Unknown> <No Description> HRESULT error code:0x80070005 Access is denied.
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:924:in `method_missing'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:924:in `getLink' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:923:in
`each'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:923:in `getLink'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2840:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:570:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:570:in `link' Iteration1_DirectorWalk.rb:414:in
`test_030_AddAnotherGroup' test_017_AddGroup(RubyTester): WIN32OLERuntimeError: click OLE error code:0 in <Unknown> <No Description> HRESULT error code:0x80070005 Access is denied.
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2013:in `method_missing' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:2013:in
`click'
Q:/Ruby/Projects/DirectorAT/Iteration1_DirectorWalk.rb:257:in
`test_017_AddGroup' (code not included for test_017_AddGroup, but the error
happens on a similar line as shown below) The test case being run ---------------------------------- def test_030_AddAnotherGroup # hits the following pages ## PAGE::settings/company ## PAGE::settings/newGroup ## PAGE::settings/userPickerNew # Make sure that we are at the inbox
page. assert($ie.contains_text("Policies
Requiring Signoff"),"Not at Inbox as expected at the start of the
test case") # Get to the add groups page. Error à $ie.link(:text,"Administration").click()
ß Error happens on
this line @@sDate=verifySession(@@sDate,@@nExpire) assert($ie.image(:src,/admin-header.gif/).hasLoaded?,"Not
on Admin page as expected") $ie.image(:id,/nav_groups/).click() @@sDate=verifySession(@@sDate,@@nExpire) assert($ie.contains_text("Groups
Administration"),"Not on Groups section of Admin Page") $ie.link(:text,"Add New
Group").click @@sDate=verifySession(@@sDate,@@nExpire) assert($ie.contains_text("Group
Permissions"),"Not on Groups section of Admin Page") $ie.text_field(:name,"gname").set("To
Be Deleted") $ie.checkbox(:name,"Perm7").set $ie.button(:id,"SubmitButton").click @@sDate=verifySession(@@sDate,@@nExpire) #Make sure that it got created
correctly. assert($ie.contains_text("Group
Created."),"Group not created properly") assert($ie.contains_text("To Be
Deleted"),"Group To Be Deleted missing from the page") # State continuity - Make sure that
we are at the inbox page. navigateToInbox($ie) @@sDate=verifySession(@@sDate,@@nExpire) end The teardown script ----------------------------- def teardown #close windows that might have
caused problems. closePrintWindows # Make sure that we are at the Inbox $ie=IE.attach(:title,/^Compli:/) $ie.set_fast_speed() navigateToInbox($ie) end Method declaration for closePrintWindows ------------------------------------------------------------- def closePrintWindows # close all open ie windows all_closed = 'unknown' while (all_closed != 'yes') begin #use a
regexp that will match any title so all ie windows are forced closed header =
Regexp.new(/Compli: Print/) @ie = IE.attach(:title,
header) @ie.close # catch the
exception raised when there's now window to attach to. rescue
NoMatchingWindowFoundException all_closed =
'yes' end end end Ideas, comments welcome. -Alan Alan Ark | Lead QA Engineer | Complí | [EMAIL PROTECTED] | office: 503.294.2020 | fax: 503.294.1200 | www.compli.com
-- |
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
