If there are no files open in the editor view, then the scripts run
fine.
com.jniwrapper.win32.com.ComException:
com.jniwrapper.win32.com.ComException: COM object method returns error
code: 0x80004005; E_FAIL (Unspecified error)
at
com.jniwrapper.win32.com.ComException.createComException(SourceFile:
80)
at com.jniwrapper.win32.automation.d.invoke(SourceFile:265)
at $Proxy2.quit(Unknown Source)
at watij.runtime.ie.IEUtil$5.perform(IEUtil.java:248)
at watij.runtime.ie.IEUtil.executeOnAllBrowsers(IEUtil.java:233)
at watij.runtime.ie.IEUtil.closeAllBrowsers(IEUtil.java:246)
Has anyone experienced anything like this? I'm guessing it might be an
Eclipse problem though.
Cheers,
Chris
Its obviously to do with the jniwrapper - can you get them to
investigate?
There's error codes there.
Cheers,
Chris
sorry I missed this before.
For you to understand what's happening I need to explain a couple of
things. I'll be a little brief, but don't hesitate to ask for
clarification.
Watij (and really all IE automation software) is based on the
Microsoft Component Object Model (MS COM or COM). With the help of COM
you can expose parts of your software to other programs by
implementing a public interface. One of these interfaces is
IWebbrowser2, which the Internet Explorer implements. Eclipse (or more
precisely SWT) hosts what is called the Webbrowser Control, which is
basicly a lite version of the Internet Explorer. When you host such a
COM control, you can override certain functionality such as the quit()
method. It seems that this is exactly what SWT does and it seems
reasonable to me.
So when you ask all Watij to close all browsers and it tries to (for
instance) close the JavaDoc-View's Webbrowser Control, SWT steps in
and returns an error.
I can't come up with an elegant solution for this problem right now.
Maybe you could elaborate on when and why you need to close all
browsers.
With kind regards
Ben Schulz
We close the browsers to ensure that all of our testcases are run
under "optimum circumstances" as some of our scripts might have
crashed the app - leaving a hung IE lying around.
Cheers again,
Chris