This error happens when you close and then open IE windows. The problem is that IE#close is asynchronous. It returns, but the IE RPC server (IE is itself made up of a server bit and a client bit both running on your machine connected via RPC) is still in the process of shutting down. Then the IE#new happens, and a new client is created using the IE RPC server that is in the process of shutting down. Then it shuts down.
There are three workarounds to this problem.
1. Add time delays between the ie.close and ie.new or ie.start. This will give a chance for the ie.close to really close.
2. Don't close IE -- just reuse the existing client between tests.
3. Create an additional IE. As long as this lives, the IE server will continue to live and you can close and create IE windows without worry.
I presume you are using Watir 1.4. The watir library in HEAD uses option 3 to avoid this problem.
The best solution would be to make ie.close synchronous. John Kordyback has an idea for how to make this happen.
Bret
On 1/13/06, Dmitri Dolguikh <[EMAIL PROTECTED]> wrote:
Hi list,
I keep getting the following error intemittently:
WIN32OLERuntimeError: Unknown property or method `document'
HRESULT error code:0x800706ba
The RPC server is unavailable.
when trying to access a link on a page. The test is being run in
Windows 2003 Server under IE 6.0.379.0, with high-security turned off.
We're trying to use Watir for automated acceptance testing; while
running tests on desktops (under Windows XP) wasn't an issue at all,
we're seeing the errors above when running tests using CruiseControl.
Cheers,
-Dmitri
_______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
