[EMAIL PROTECTED] wrote: > Hi > > Once and a while I get the following two errors: > > WIN32OLERuntimeError: Unknown property or method: `visible' > HRESULT error code:0x800706be > The remote procedure call failed. > > WIN32OLERuntimeError: Unknown property or method `quit' > HRESULT error code:0x800706ba > The RPC server is unavailable. > > Is this caused by something I'm doing wrong or is this a flaw in Watir or > the Win32 Ruby library? > > I'm using Watir 1.4.1 with Ruby 1.8.2-15. > > Thanks >
This is a flaw in Watir, for which there are a couple of workarounds. This can happen in the following scenario 1. create browser 2. close browser 3. create browser -- error sometimes happens here The problem lies in the way IE is structured and the way that Watir 1.4 interacts with it. Specifically, Watir creates a "client windows" that interacts with the "IE RPC Server". This is not a web server, but rather the IE process running on your computer. When the last client to this server is closed, the "server" will also start closing, but this happens asynchronously. In your case, you are probably trying to get a new IE window, and it is trying to connect to the IE RPC server that is actually in the process of closing down. The simplest workaround is to reuse IE windows instead of opening and closing them. Another workaround is to leave IE window open at the beginning of your session (it can be invisible) and then when you open and close windows, the IE RPC Server will never shutdown, because there always will be one window connected to it. Perhaps the best solution is to start a separate IE process for each IE window. We have prototyped this approach in the Watir/Contrib directory of 1.5.1.1100. Bret _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general