com.jniwrapper.win32.com.ComException: COM object method returns error code:
0x80040154; Class not registered
java.lang.reflect.InvocationTargetException
at
com.jniwrapper.win32.MessageLoopThread.doInvokeAndWait(MessageLoopThread.java:225)
at watij.runtime.ie.IEController.attach(IEController.java:247) at
watij.runtime.ie.IEController.attachByTitle(IEController.java:242) at
watij.IE.attach(IE.java:100) at
watij.AttachToExistingWindowTest.testExistingWindow(AttachToExistingWindowTest.java:19)Caused
by: com.jniwrapper.win32.com.ComException: COM object method returns error code:
0x80040154; Class not registered at
com.jniwrapper.win32.com.ComException.checkResult(SourceFile:72) at
com.jniwrapper.win32.com.ComFunctions.coCreateInstance(SourceFile:140) at
com.jniwrapper.win32.com.impl.IUnknownImpl.<init>(SourceFile:73) at
com.jniwrapper.win32.automation.impl.IDispatchImpl.<init>(SourceFile:53)
at watij.shdocvw.impl.IShellWindowsImpl.<init>(IShellWindowsImpl.java:38)
at watij.shdocvw.ShellWindows.create(ShellWindows.java:31) at
watij.runtime.ie.IEController$AttachByTitleOrUrl.run(IEController.java:262) at
com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.run(MessageLoopThread.java:531)
at
com.jniwrapper.win32.MessageLoopThread$LoopThread.run(MessageLoopThread.java:480)
Hi,
Is anybody having a problem with attaching an existing window using Watij 3.0? All of my test cases require this feature. When I try to attach an existing IE window, I get a the following error:
com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x80040154; Class not registered
I decided to build Watij on my machine and then run the WatijTestCases. All but three of the of the tests passed. The following test cases had errors::
- AttachToExistingWindowTest
- AttachToNewWindowTest
- ChildBrowserTest
Here is a sample of the error:
java.lang.reflect.InvocationTargetException at com.jniwrapper.win32.MessageLoopThread.doInvokeAndWait(MessageLoopThread.java:225) at watij.runtime.ie.IEController.attach (IEController.java:247) at watij.runtime.ie.IEController.attachByTitle(IEController.java:242) at watij.IE.attach(IE.java:100) at watij.AttachToExistingWindowTest.testExistingWindow(AttachToExistingWindowTest.java:19)Caused by: com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x80040154; Class not registered at com.jniwrapper.win32.com.ComException.checkResult(SourceFile:72) at com.jniwrapper.win32.com.ComFunctions.coCreateInstance (SourceFile:140) at com.jniwrapper.win32.com.impl.IUnknownImpl.<init>(SourceFile:73) at com.jniwrapper.win32.automation.impl.IDispatchImpl.<init>(SourceFile:53) at watij.shdocvw.impl.IShellWindowsImpl.<init>( IShellWindowsImpl.java:38) at watij.shdocvw.ShellWindows.create(ShellWindows.java:31) at watij.runtime.ie.IEController$AttachByTitleOrUrl.run(IEController.java:262) at com.jniwrapper.win32.MessageLoopThread$ThreadSynchronizedAction.run (MessageLoopThread.java:531) at com.jniwrapper.win32.MessageLoopThread$LoopThread.run(MessageLoopThread.java:480)
Any ideas?
Thanks
John
I met the same problem.
Try this command to register the .dll: "regsvr32.exe /i shdocvw.dll".
This should return "DllRegisterServer and DllInstall in shdocvw.dll
succeeded."
Attaching existing windows works for me now.
Cheers,
Andreas