Update on iMacros using Java

Information related to the use of iMacros for uptime monitoring, performance and regression testing of websites.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team
Post Reply
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Update on iMacros using Java

Post by Tech Support » Wed Jun 14, 2006 11:49 am

[update] The wrapper below refers to the obsolete COM object "InternetMacros.iim", which now is simply called "imacros". To use the wrapper, you will need to replace this string in the class "IMacrosWrapper.java" (line 133) until a new wrapper is released.

Code: Select all

public class IMacrosWrapper implements RegistryConstants
{
   /* Instead of providing the CLSID, which might be difficult to
   * obtain and might also change due to changes in the Scripting
   * Interface, the Registry is now queried for the correct CLSID
   * using the ProgID, which is (hopefully) easier to obtain
   */   
   //private static final String standardProgID = "InternetMacros.iim"; // <-- old name
   private static final String standardProgID = "imacros";
[End of update]

Hi,

We updated the IMacrosWrapper class which facilitates the usage of the Scripting Interface and Java classes. The most important fixes:

0) Names changed to standard names, i.e. with a preceeding iim as in iimPlay(). The old names were kept for downward compatibility. That means that when compiling a class which uses these methods you will get a "Class uses deprecated methods" message by the Java compiler.
However, the class will compile and it will not fail during run time.

1) getLastMessage() and exitAllBrowsers() are not longer supported by the Scripting Interface, thus they were marked deprecated. That means that when compiling a class which uses these methods you will get a "Class uses deprecated methods" message by the Java compiler.
Please note that, although the class will compile, it will fail during run time due to the non-existance of the functions in the iimInterface.dll. This message will be

Code: Select all

org.jawin.COMException: 80020006: Unknown name.
2) The timeout option is now available in calls to iimPlay(), iimDisplay() and iimExit()

3) Return types changed from Short to Integer

4) The CLSID of the iimInterface.dll, which is needed to establish connection between Java and the Scripting Interface, is now dynamically retrieved from the Registry. For this retrieval the ProgID of the dll is needed, which is InternetMacros.iim. This ProgID is used when the standard constructor

Code: Select all

IMacroWrapper()
is used. Since the ProgID might change, I also added a new constructor

Code: Select all

IMacrosWrapper(String progId)
which takes the ProgID as argument.

5) The initialization of the jawin bridge to the iimInterface.dll is now included in the iimInit() call (instead of the constructor) and the uninitialization is included in the iimExit() call. That means that the method close() is also deprecated.

Regards
---
Lasse Clausen, iOpus Support
Last edited by Tech Support on Sun Jun 18, 2006 2:37 pm, edited 4 times in total.
pigsie
Posts: 6
Joined: Wed May 10, 2006 3:52 pm

Thanks

Post by pigsie » Wed Jun 14, 2006 4:58 pm

Thanks

This is a life saver as it should fix the unknown name error I was geting.
jstatham
Posts: 10
Joined: Sat Jan 20, 2007 11:13 pm

Post by jstatham » Sat Jan 20, 2007 11:20 pm

I have followed the instructions at http://www.iopus.com/imacros/tutorials/java.htm
and when I try to compile I get the following error:

cannot access org.jawin.COMException
class file for org.jawin.COMException not found
result = imacros.iimInit();

Can anyone help???
mrLenin
Posts: 1
Joined: Tue Jan 16, 2007 9:35 am

Post by mrLenin » Thu Feb 15, 2007 1:22 pm

Sorry, but no. I didn't get such error.
vickyd
Posts: 1
Joined: Tue Nov 06, 2007 4:37 am

Error while running the JavaWrapper Test Program

Post by vickyd » Tue Nov 06, 2007 4:54 am

Hi,

I am trying out this great product to integrate with our application which is in Java.

I have downloaded jawin from http://sourceforge.net/projects/jawinproject/ and wrapper class from http://www.iopus.com/download/imacroswrapper.zip

When I run the test program provided with the example, I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/jawin/win32/RegistryConstants

Am I using wrong version of Jawin or wrapper class? Please advise and point me to the correct combination of these libraries.


Thanks
Post Reply