Firefox 16 remove support for "java" DOM object
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
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
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
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Firefox 16 remove support for "java" DOM object
Hi,
Does anyone find a solution to call java in iMacros js since firefox 16 ?
Skippyto.
Does anyone find a solution to call java in iMacros js since firefox 16 ?
Skippyto.
-
- Posts: 3834
- Joined: Mon May 31, 2010 4:59 pm
Re: Firefox 16 remove support for "java" DOM object
Hi skippyto,
Would you please provide an example of what exactly no longer works? Thanks!
Would you please provide an example of what exactly no longer works? Thanks!
Regards,
Tom, iMacros Support
Tom, iMacros Support
Re: Firefox 16 remove support for "java" DOM object
Hi Tom,
Calling java.* in iMacros js script is no more possible.
For example, with firefox 15 i was able to do that :
But since firefox16, i obtain the message
--> https://bugzilla.mozilla.org/show_bug.cgi?id=748343
--> https://developer.mozilla.org/en-US/doc ... Extensions
(The DOM java object has been removed in Gecko 15.0 ((Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12). For this and other reasons, you should not write extensions that use Java code.)
Skippyto
Calling java.* in iMacros js script is no more possible.
For example, with firefox 15 i was able to do that :
Code: Select all
var filename = new java.io.File(Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch).getCharPref('extensions.imacros.defsavepath') + "/test.txt");
More informations from Mozilla community :ReferenceError: java is not defined (Error code: 991)
--> https://bugzilla.mozilla.org/show_bug.cgi?id=748343
--> https://developer.mozilla.org/en-US/doc ... Extensions
(The DOM java object has been removed in Gecko 15.0 ((Firefox 15.0 / Thunderbird 15.0 / SeaMonkey 2.12). For this and other reasons, you should not write extensions that use Java code.)
Skippyto
Re: Firefox 16 remove support for "java" DOM object
Thank you for your reply . Judging from the second link all is not lost yet.
I've only browsed a little the second link you gave me and it writes about use of java in firefox extensions so I can still use java code in iMacros javascript file. But I will have to find different solution for FireFox 16 and above.
Thanks.
I've only browsed a little the second link you gave me and it writes about use of java in firefox extensions so I can still use java code in iMacros javascript file. But I will have to find different solution for FireFox 16 and above.
Thanks.
Re: Firefox 16 remove support for "java" DOM object
Can anyone care to explain how to use LiveConnect ?
Does using LiveConnect enable use of Java in FireFox 16,17,+ ?
Does using LiveConnect enable use of Java in FireFox 16,17,+ ?
-
- Posts: 22
- Joined: Mon Apr 14, 2008 2:23 pm
Re: Firefox 16 remove support for "java" DOM object
Hi,
In short, you can not use Java with iMacros for Fx anymore.
Replaying of Javascript files in iMacros for Fx was made sandboxed since 7.5.2.0 which prevents anything but very basic Javascript functions.
Fx 16 also drops the support for java.*
These two facts prevents you from using Java if you use either Fx >= 16 or iMacros >= 7.5.2.0
(LiveConnect was the technology to support java.* which means you can not use it in Fx 16, 17)
In short, you can not use Java with iMacros for Fx anymore.
Replaying of Javascript files in iMacros for Fx was made sandboxed since 7.5.2.0 which prevents anything but very basic Javascript functions.
Fx 16 also drops the support for java.*
These two facts prevents you from using Java if you use either Fx >= 16 or iMacros >= 7.5.2.0
(LiveConnect was the technology to support java.* which means you can not use it in Fx 16, 17)
Re: Firefox 16 remove support for "java" DOM object
Hi,
we've found an alternate solution to do what we wanted with java by using the browser's objects.
But, in the new beta version (V8.21), we can't access anymore to these objects, having the following error :
Can you tell us if this is a bug from the new iMacros version, or a change made by Mozilla ?
Thanks for your help !
Skippyto.
we've found an alternate solution to do what we wanted with java by using the browser's objects.
But, in the new beta version (V8.21), we can't access anymore to these objects, having the following error :
The line 8 of our js is just used to define the download path for what iMacros will download :TypeError: Components.classes is undefined, line: 8 (Error code: 991)
Code: Select all
var downPath = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch).getCharPref('extensions.imacros.defdownpath') ;
Thanks for your help !
Skippyto.
Re: Firefox 16 remove support for "java" DOM object
Can you send me a message how are you using Java in FF16 and above? My email is in my profile and I don't want to put it publicly.
So far the only way I know of how to use Java in iMacros is by making 2 instances of Mozilla FireFox- One is 15 the other is above.
link
So far the only way I know of how to use Java in iMacros is by making 2 instances of Mozilla FireFox- One is 15 the other is above.
link
-
- Posts: 3834
- Joined: Mon May 31, 2010 4:59 pm
Re: Firefox 16 remove support for "java" DOM object
Hi skippyto,skippyto wrote: we've found an alternate solution to do what we wanted with java by using the browser's objects.
But, in the new beta version (V8.21), we can't access anymore to these objects, having the following error :The line 8 of our js is just used to define the download path for what iMacros will download :TypeError: Components.classes is undefined, line: 8 (Error code: 991)Can you tell us if this is a bug from the new iMacros version, or a change made by Mozilla ?Code: Select all
var downPath = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch).getCharPref('extensions.imacros.defdownpath') ;
Would you please open a support ticket regarding this issue and reference this forum thread, thanks!
Regards,
Tom, iMacros Support
Tom, iMacros Support
Re: Firefox 16 remove support for "java" DOM object
Hi Tom,
Thanks for your help, I've open a ticket !
And I've just seen a new beta version (http://wiki.imacros.net/iMacros_for_Fir ... on_History), so i'll do some tests on it !
Skippyto.
Thanks for your help, I've open a ticket !
And I've just seen a new beta version (http://wiki.imacros.net/iMacros_for_Fir ... on_History), so i'll do some tests on it !
Skippyto.
Re: Firefox 16 remove support for "java" DOM object
I can't reproduce this issues in the new beta version :
The following lines gave me "D:\iMacros\Downloads"
But some others function from javascript don't work anymore such as :
which give me :
Skippyto
edit : XMLHttpRequest objet give the same error.
The following lines gave me "D:\iMacros\Downloads"
Code: Select all
var downPath = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch).getCharPref('extensions.imacros.defdownpath') ;
alert(downPath) ;
But some others function from javascript don't work anymore such as :
Code: Select all
setTimeout("alert('test');",15000) ;
ReferenceError: setTimeout is not defined, line: 492 (Error code: 991)
Skippyto
edit : XMLHttpRequest objet give the same error.
Re: Firefox 16 remove support for "java" DOM object
Hi,
I just have a few minutes to have a look at my javascript's problems while playing js files.
It appears that in FF18, javascript's syntax is more restrictive. Finally, I just changed to and to
And everything is going better since i've made this small changes !
Even the screen freeze have disappeared, now
I'll do some performance tests before using FF18 and the new beta, but it seems to be good for me now !
Thanks for your good job on the new beta ! I haven't had the time to test the new EVENT feature, but it seems to be interressant !
Writing the word EVENT made think that I found a tip which is better (for me) that what is written in the wiki (http://wiki.imacros.net/TAG) about how to prevent the TAG command to follow a link :
So, on my side I prefer to use TAG ... CONTENT=EVENT:MOUSEOVER because if the link is not present you'll have an error ! And in most of the cases you won't follow the link
Maybe this could be a good tip to add in the wiki ?
Skippyto.
I just have a few minutes to have a look at my javascript's problems while playing js files.
It appears that in FF18, javascript's syntax is more restrictive. Finally, I just changed
Code: Select all
setTimeout("alert('test');",15000) ;
Code: Select all
window.setTimeout("alert('test');",15000) ;
Code: Select all
xmlhttp=new XMLHttpRequest();
Code: Select all
const XMLHttpRequest = Components.Constructor("@mozilla.org/xmlextras/xmlhttprequest;1");
var xmlhttp = XMLHttpRequest();
Even the screen freeze have disappeared, now
I'll do some performance tests before using FF18 and the new beta, but it seems to be good for me now !
Thanks for your good job on the new beta ! I haven't had the time to test the new EVENT feature, but it seems to be interressant !
Writing the word EVENT made think that I found a tip which is better (for me) that what is written in the wiki (http://wiki.imacros.net/TAG) about how to prevent the TAG command to follow a link :
Doing that way, if the link is not present you won't have and error, and you'll need to use the js script to get the result of the extract when you want to verify if the link is present.How to avoid following links
If you want to use a link or button as a reference, you should tag it with TAG ... EXTRACT=TXT, to avoid following the link or "clicking" the button. In that case, do not forget to use SET !EXTRACT NULL, to clear the extract variable before the real extract.
So, on my side I prefer to use TAG ... CONTENT=EVENT:MOUSEOVER because if the link is not present you'll have an error ! And in most of the cases you won't follow the link
Maybe this could be a good tip to add in the wiki ?
Skippyto.
Re: Firefox 16 remove support for "java" DOM object
@skippyto I follow this topic and I am looking for a way to use Java in iMacros .
Can we please exchange contacts? My email is on my profile.
Can we please exchange contacts? My email is on my profile.
Re: Firefox 16 remove support for "java" DOM object
@ Colibry, it's impossible to use java with iMacros since firefox 16, you'll have to use browser's objects (XPCOM components) instead.
You'll find documentation at https://developer.mozilla.org/en-US/docs/XPCOM. And for more about using it with javascript, just follow the links : https://developer.mozilla.org/en-US/doc ... Javascript and https://developer.mozilla.org/en-US/doc ... ut_leaking
You also can find some examples on Mozilla developers' website. For example, if you want to write into somes files from from your iMacros' js, you'll find some informations there : https://developer.mozilla.org/en-US/doc ... s/File_I_O
Skippyto.
You'll find documentation at https://developer.mozilla.org/en-US/docs/XPCOM. And for more about using it with javascript, just follow the links : https://developer.mozilla.org/en-US/doc ... Javascript and https://developer.mozilla.org/en-US/doc ... ut_leaking
You also can find some examples on Mozilla developers' website. For example, if you want to write into somes files from from your iMacros' js, you'll find some informations there : https://developer.mozilla.org/en-US/doc ... s/File_I_O
Skippyto.
Re: Firefox 16 remove support for "java" DOM object
@skippyto thank you for this explanation.
I will go over the links you gave me and try to develop new methods to use in my scripts. So tell me please can I rewrite this function bellow (I found it on this forum) to use XPCOM components or I can forget about using it all and write something new.
I will go over the links you gave me and try to develop new methods to use in my scripts. So tell me please can I rewrite this function bellow (I found it on this forum) to use XPCOM components or I can forget about using it all and write something new.
Code: Select all
//Load a file into a string
// filePath example: "C:\\temp\\myFile.txt"
function loadFile(filePath){
// Load the file
var stringBuilder = new java.lang.StringBuilder();
var bufferedReader = new java.io.BufferedReader(new java.io.FileReader(filePath) );
var line = null;
while( ( line = bufferedReader.readLine()) != null)
stringBuilder.append(line + java.lang.System.getProperty("line.separator") );
bufferedReader.close();
return stringBuilder.toString();
}