- iMacros 12.6.505.4525 (Enterprise 30 day trial, downloaded in mid May 2020, 2 weeks ago)
- iMacros for FF: VERSION BUILD=10021450
- Windows 10 64-bit 10.0.18363.836 (English), all latest OS updates applied
- IE 11.836.18362.0
- FF 76.0.1 64-bit
- Chrome Version 83.0.4103.61 (Official Build) (64-bit)
iMacro demo/sample macros status on my system
All demo macros run on iMacros browser and IE except (including the VBS sample scripts):
- draw.iim : loading website crashes imacros browser and IE: http://demo.imacros.net/Automate/JavaDraw
- DirectScreen Click.iim: loading website crashes imacros browser and IE: http://demo.imacros.net/Automate/JavaCalculator
- the urls work just fine in both FF and Chrome (urls load w/o any issues)
- IE: urls pasted directly into regular IE w/o imacros: urls fail to load, IE says page has to be reloaded and shows error message that page failed to load
- iMacros browser: urls pasted directly into browser: iMacro browser crashes with no error messages (just disappears; nothing in the iMacros crash log)
- also tried off of a fresh reboot and still did not work
Description of Issue
Besides the issue of the 2 demo macros not working as described above (not the main issue I am reporting but the FAQ stated to include a report on the demo macros), the main issue I am reporting is when using a simple Javascript to execute either a DS CLICK or IMAGECLICK on www.google.com (over and over again in a loop), both the iMacros browser and iMacros for IE will hang/become unresponsive within 1-5 minutes. In my JS script, iimPlay fails with "the browser did not respond before timeout" which makes sense since iMacros hung. The exact commands I am using to achieve this are below:
Code: Select all
DS CMD=CLICK X=50 Y=800 CONTENT=
Code: Select all
IMAGECLICK POS=1 IMAGE=.\\google.png CONFIDENCE=70
NOTE: I was unable to test scripting with FF/Chrome since there is no free license for those (although if I understood correctly, DS/IMAGECLICK do not work in FF). If I could get a free license for those, I would be happy to run some tests and report the results (if these commands work in those browsers).
Sample test code used to reproduce the issue
I have supplied the exact same test code that I used to reproduce this issue on my system. I have reproduced this issue over 20 times and it will happen 100% of the time when I run these tests within just a few minutes. There are 3 files in total for the test. Simply copy the code below into files that are contained in the same folder (hang.js and hang.html, also copy the google.png attachment) and double click on hang.html to run the tests. google.png - image that is clicked on using IMAGECLICK (google apps icon).
hang.html: run this file and press a button to test each flavor of iMacros with DS CMD or IMAGECLICK:
hang.js: simple javascript that sends DS CMD or IMAGECLICK to www.google.com in a loop:<!DOCTYPE html>
<html>
<head>
<title>
imacros js script
</title>
<script type="text/javascript" src="hang.js"></script>
</head>
<body>
<input type="button" onclick="imacros_hang('',true)" value="Press to hang imacros browser with ds click"/>
<input type="button" onclick="imacros_hang('',false)" value="Press to hang imacros browser with imageclick"/>
<input type="button" onclick="imacros_hang('-ie',true)" value="Press to hang imacros IE with ds click"/>
<input type="button" onclick="imacros_hang('-ie',false)" value="Press to hang imacros IE with imageclick"/>
</body>
</html>
function imacros_hang(type,do_ds)
{
var iim1 = new ActiveXObject("imacros");
var iret = 0;
iret = iim1.iimOpen(type, false);
if (iret < 0)
{
s = iim1.iimGetErrorText();
alert("Open failed: " + s);
return;
};
mc = "CODE:";
mc += "URL GOTO=https://google.com" + "\n";
iret = iim1.iimPlay (mc);
if (iret < 0)
{
s = iim1.iimGetErrorText();
alert("initial play failed: " + s);
return;
};
let count=1;
mc = "CODE:";
mc += "SET !PLAYBACKDELAY 0.2" + "\n";
mc += "SET !ERRORIGNORE YES" + "\n";
mc += "SET !TIMEOUT_STEP 0" + "\n";
if (!do_ds) mc += "IMAGECLICK POS=1 IMAGE=.\\google.png CONFIDENCE=70" + "\n";
if (do_ds) mc += "DS CMD=CLICK X=50 Y=800 CONTENT=" + "\n";
do
{
iret = iim1.iimPlay (mc);
if (iret < 0)
{
var today2 = new Date();
var date2 = today2.getFullYear()+'-'+(today2.getMonth()+1)+'-'+today2.getDate();
var time2 = today2.getHours() + "-" + today2.getMinutes() + "-" + today2.getSeconds();
var dateTime2 = date2+'_'+time2;
s = iim1.iimGetErrorText();
alert("Play failed: (count=" + String(count) + "): " + s + " date and time: " + dateTime2);
return;
};
count++;
//if ((count % 50) == 0) alert ("Completed " + String(count) + " loops!");
} while (1);
};