This is about the development code.

While looking at the xpath work, i ran into this problem, previously reported:

But when I tried to run xpath_tests.rb or all_tests.rb I got lots of exceptions & errors. One thing that was strange was two IE instances were getting opened when I tried to run any of these files. Then one got closed & there were lot of failures each was saying 'The object invoked has disconnected from its clients.'. So what I think is the IE instance that was closed (don't know how) was the correct IE that was being referenced in the tests. The IE instance that remained open (don't know how it got opened) is the one that is not used anywhere in the scripts.

This problem actually has nothing to do with xpath.

I tracked down this problem and believe i've fixed it. Here are my notes:

 This fixes a long standing nagging problem -- or at least one
that has been nagging me a lot, although there has been little
public discussion.

The problem showed up either as a delay when successively
running scripts. If you ran one script and then ran another
(as a new ruby process) then the second script would usually
wait about 30 seconds before running. This was really annoying
especially when running short unit tests.

The other way that the problem would show up would be that
a script would get unable to connect to OLE errors on first
running it.

Analysis showed that this problem was coincident with the
fact that there was an iexplore.exe process that was living
for about 30 seconds after a script exited. If you killed
this process manually, then the delayed/failed behavior would
be avoided.

This problem now appears to have been a side effect of a
solution to a similar problem. That problem was that users
would get OLE errors when they ran successive test scripts
(in the same test suite) that closed and opened browsers
(typically one per script).

The solution was to create an additional, hidden browser
that would essentially keep the iexplore process from closing
(which was the source of the OLE errors).

The new solution was to only create this additional, hidden
browser when the @@persist_ole_connection class variable is
true. It is now nil by default. Users that want to open and
close browsers in their scripts will want to set this to true.



_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to