Problems running scripts through Eclipse

2 views
Skip to first unread message

chrishall_ie

unread,
Oct 17, 2007, 6:12:56 AM10/17/07
to watij
Hi all,
I get the following problem when I try to run my scripts through
Eclipse v3.2.2 (only when files are open however).

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

fm

unread,
Oct 17, 2007, 6:24:41 AM10/17/07
to watij
Doesnt happen in netbeans, maybe you should look at changing over.

chrishall_ie

unread,
Oct 24, 2007, 8:42:31 AM10/24/07
to watij
Can anyone shed some light on this?

Its obviously to do with the jniwrapper - can you get them to
investigate?
There's error codes there.

Cheers,
Chris

Ben

unread,
Oct 24, 2007, 12:47:34 PM10/24/07
to watij
Hello 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

chrishall_ie

unread,
Oct 25, 2007, 10:40:04 AM10/25/07
to watij
Hi Ben,
thanks for the reply.. that explains a lot.

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

Reply all
Reply to author
Forward
0 new messages